??? 11/21/06 18:05 Read: times |
#128373 - be sure or not to be? Responding to: ???'s previous message |
hi,
Jan Waclawek said:
Exactly as Erik said somewhere above: to have available as much memory as possible for a particular task.
For example, error logging. There is nothing mission-critical in it, hence I don't require some exact amount of memory for it; but I want to use all the unused memory for it, to have as much errors logged as possible. Well, but how can you be sure, for example, that next realization of sprinf() which is used to place next error string into that "free memory", does not allocate some of free memory for itself temporaly? Or about that second programmer who wrote log_this_error() does call malloc() never? In case of the full control over programming and compiler tools you, indeed, are free to do all you want. I would suggest as already said: define dummy segment, arrange it in locator options to be "last" one and then use rest free memory above (below? (= If you are One needs to know how much memory one wants to allocate. I want to allocate "all the rest".
Are you sure that it is not segmented? For example, Keil does produce "lags" in memory allocations, be warning! Regards, Oleg |