This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fixed memory pools


On Mon, Feb 18, 2002 at 10:08:40AM +0100, Tom Coremans wrote:
> suppose I have created a fixed memory pool of 1000 bytes with a block
> size of 100 bytes. Is it then possible to obtain 10 blocks of 100 bytes
> from the pool without freeing any of them or will that not work. Are
> there maybe some blocks that are used for admin information??

Yes, some blocks are used for admin. It keeps a bitmap of blocks
free/in use. For this example, expect to get 9 usable blocks. This
caught me out the first time i used fixed is memory pools. After some
discussion with RedHat i think they added a comment to the
documentation to say there is some overhead. It actually says:

"The memory available from the memory pools will not be the same size
as the memory supplied to it. Some of the memory is used for internal
data structures of the allocator."

     Andrew

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]