Re: How does free() know how many bytes to free???
- From: Paul Pluzhnikov <ppluzhnikov-nsp@xxxxxxxxxxx>
- Date: Tue, 27 Nov 2007 06:43:20 -0800
Wolfgang Draxinger <wdraxinger@xxxxxxxxxxxxxxxx> writes:
MAx wrote:....
How does free() know how many bytes to deallocate?
Have a look at the source code of your libc.
The malloc implementation inside glibc is not very easy to
understand, because it is "production" code, optimized for speed,
multi-threaded access, etc.
A much simpler implementation can be found in K&R (2nd edition,
p.185) -- Chapter 8.7 Example -- A Storage Allocator.
Cheers,
--
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
.
- Follow-Ups:
- Re: How does free() know how many bytes to free???
- From: phil-news-nospam
- Re: How does free() know how many bytes to free???
- References:
- How does free() know how many bytes to free???
- From: MAx
- Re: How does free() know how many bytes to free???
- From: Wolfgang Draxinger
- How does free() know how many bytes to free???
- Prev by Date: Re: module license taints kernel.
- Next by Date: kernel module unresolved symbol
- Previous by thread: Re: How does free() know how many bytes to free???
- Next by thread: Re: How does free() know how many bytes to free???
- Index(es):
Relevant Pages
|