I'm currently developing for XBox, and I have some problems with the "new" operator.
Fact is, it's quite good for large chunks of memory, but for small data structure has way too much overhead (IMO).
For instance, if I write:
char ch=new char;
1) the one char I asked for
2) 15 bytes for padding the "structure" to 16 bytes
3) 16 bytes of "memory descriptor", to let the "delete" operator do its job.
Allocating small memory blocks causes an horrific memory fragmentation, not to mention that I am wasting tons of memory, and 64 MB aren't *that* much anyway, these days.
Anyone knows how to get less overhead than that?
Thanks in advance.