Discussion Forum

Memory pool

Next Thread | Thread List | Previous Thread Start a Thread | Settings

DetailsMessage
Read-Only
Author
Roberto Hosman
Posted
14-Aug-2002 10:55 GMT
Toolset
C51
New! Memory pool
Hello all,
I'm working with C51 complier ver 7.00.
Can anyone help me with the following questions?

1. For using functions like malloc, calloc and etc I need to define memory pool. If I define a memory pool with a size of X, but for some reason I don't use it, can the complier use the X space for other variables?

2. At previews compiler versions (5.5, 6.0) the memory allocation routine required 5 bytes of extra space for each allocated block. Is it the same in ver 7.00?

Thanks a lot,
Roberto H.
Read-Only
Author
Andrew Neil
Posted
14-Aug-2002 13:45 GMT
Toolset
C51
New! RE: Memory pool
"1. For using functions like malloc, calloc and etc I need to define memory pool. If I define a memory pool with a size of X, but for some reason I don't use it, can the complier use the X space for other variables?"

The memory requirements of the compiled code are fixed at compile time.

However, there is nothing to stop you overlapping your runtime dynamic memory pool with your compiler variables - that should be a whole bunch of fun... ;-)

Next Thread | Thread List | Previous Thread Start a Thread | Settings