[H8-ML(172)] Re: malloc in newlib
From: Junsuke Kunugiza <jk@xxxxxxx>
Date: 1999年06月21日(月)17時56分44秒
# 久々の日英混入モード。ごめんね。

Hello,

> The problem with malloc/free showed up at comp.arch.embedded.
> I attach some messages from that thread. Sorry they are
> a bit long...

Thanks for your reply.  This is the information that I was
searching for since several days.

So, that tells us the default sbrk() code is not more than
a skeleton with little bit of example.  It seems like we should
find a better working codes from somewhere or implement a own
version of it... that's a pain, though.

ということで、これを見た限りでは、デフォルトの sbrk() は
スケルトンにコーディング例が加わったぐらいのものと言える
でしょう。もうちょっとまともなコードを探すか、自前の物を
実装するのが良いのでしょうが、面倒そうです。

I don't really have a good idea how to do this. A very limited
malloc / free implementation that can handle storage allocation
and deallocation shouldn't be a too hard work.  But because
running program may call malloc and free in disorderly manner,
I have to make some sort of memory defragment stuff.  

I believe this is important, because embedded systems may run
continuously for some long time.

それをどうするかは、いい方法が思いつきません。メモリの
確保と解放を行うだけの malloc / free の実装はそう難しくない
でしょうが、プログラムが malloc と free を適当に呼ぶことを
考えると、メモリの断片化をどうにかするものを作らないといけ
ないですね。

組み込み系システムは長い間、連続的に稼働することもあるので、
これは重要なことと思います。


椚座 淳介 (Junsuke Kunugiza)
E-Mail: kunugiza@xxxxxxx

スレッド概略
[表示中](起点)


投稿順に移動
[←前の記事へ(P)]
[→次の記事へ(N)]


リスト表示へ
[このスレッド(T)]
[本記事の前後(L)]