[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-dev] [ot] C/C++ mem allocation



i suppose this is off-topic (i apologize)...

how would one allocate n bytes of memory before main is initialized in C/C++?

the deal is, i have a bunch of static variables/structures which are consuming
memory.  i want to be able to allocate, say 1.5 Gigs of memory (physical +
virtual) but this isn't happening since the memory is no longer contiguous
after all the static vars/structs have been given their own memory space.  i'm
assuming there's a way around this, so that n bytes of memory can be allocated
BEFORE the static vars/structs.

thanks,

christian