Re: malloc() implementation
- From: Clever Monkey <clvrmnky.invalid@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 31 May 2006 14:41:42 -0400
Flash Gordon wrote:
John Devereux wrote:Flash Gordon <spam@xxxxxxxxxxxxxxxxxx> writes:
You can't write a malloc routine in standard C which might be part of
why it is in the standard library, hence the suggestion of asking in a
Linux group.
What you *can* do though is statically allocate a memory buffer, then
allocate out of that with your own "malloc".
True, as long as you call is something other than malloc ;-)
It all depends on what the OP actually wants to achieve.
Wouldn't interpositioning allow you to define a default global symbol "malloc" that would essentially overwrite the Standard one?
Not, mind you, something I recommend, but isn't one of the hallmarks of C that one can do this without constraint, making all code (including any external libs that are linked in later) use the non-standard function?
.
- Follow-Ups:
- Re: malloc() implementation
- From: Keith Thompson
- Re: malloc() implementation
- References:
- malloc() implementation
- From: Karsten Jung
- Re: malloc() implementation
- From: Flash Gordon
- Re: malloc() implementation
- From: John Devereux
- Re: malloc() implementation
- From: Flash Gordon
- malloc() implementation
- Prev by Date: Re: Help is need immidiately
- Next by Date: Re: Help is need immidiately
- Previous by thread: Re: malloc() implementation
- Next by thread: Re: malloc() implementation
- Index(es):
Relevant Pages
|