Re: __malloc_init_space (example)
Nikola Vladov <[email protected]>
| Newsgroups | gmane.linux.lib.dietlibc |
|---|---|
| Message-ID | <[email protected]> |
On Thu, May 21, 2009 at 09:21:41AM +0200, Laurent Bercot wrote: > What your idea basically achieves is move the first allocated > page from the heap to the static memory. That would be useful if > static memory were somehow "cheaper" than heap memory. But it's > not. Quite the contrary: heap memory can be reclaimed by the system, > whereas static memory cannot. > > DJB's goal in alloc.c was not to avoid using heap memory. It was > to avoid malloc() entirely and be able to give the guarantee that > some of his programs did not dynamically allocate memory *at all*. Good advice. I will make this pointer static and the problem with static buffer disappear. I think this pointer is 1% from my algorithm. Since nobody intrested from the mathematics aspect of the algorithm I give I find my project _dead_ already! Please, _don't use_ this malloc and very sorry for all my postings on this topic here. Regards, Nikola PS. I am not 100% sure, but may be Laurent does not look on the source before writting. Have you seen only this pointer, Laurent? Really the discusion obout the pointer is good, but not so important!