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]

eCos Kernel: ALLOC callbacks


About a month ago, I suggested making some changes to eCos that would allow:

a) a callback for every heap creation
b) a callback for every heap destroy
c) a callback for post allocation/decallocation
d) a callback for pre allocation/decallocation

This was so that you could add additional functionality, like putting in 
padding in the alloced memory blocks to make certain memory isn't being 
corrupted, and being certain that you're not allocated from heaps that have 
been destroyed, etc.

Here are my questions:

1)

I think the changes need to be made to

services/memalloc/common/current/src/memvar.cxx
services/memalloc/common/current/src/memfixed.cxx

And the definitions of the classes Cyg_Mempool_Fixed and Cyg_Mempool_Variable

And that should cover doug lea's memory allocation as well.  Is this correct 
or am I missing other classes that need to be modified

2)

It appears that heaps are being created before cyg_user_start.  I want to 
install the callbacks into the system before any heaps are created - where 
should I install the callbacks?

3)

I would like to make the callbacks global that that installing the callbacks 
will do it for all heaps, not just an individual heap.  Are there any 
objections to this?


Thanks,
-Rich

--
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]