This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


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

Dynamic Memory Trickery


Hi all,
	Recently I've implemented my own memory zone under Linux which
uses 4MB pages.  I modified insmod and the related system calls to insert
modules into that memory zone.  We're basically running an application
inside of this module.  I can take out all file i/o, sockets, etc.
However, use of dynamic memory allocation is there to stay.
	So what I want to do is use the compiler to manage my dynamic
memory instead of the kernel.  I want to fool the application into
thinking it already has a lot of memory it can use (and basically, it
does, because it can use _all_ of the memory in my zone).  malloc() will
not need to make any system calls if it has enough memory to fulfill a
memory request, correct?
	So basically, I just need malloc to start allocating memory from
an address at or above something I specify, and for it to realize it
already has quite a lot of memory space to play with.  Does anyone have
any ideas?

TIA,

-Justin


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