Why does the stack address grow towards decreasing memory addresses?

First, it’s platform dependent. In some architectures, stack is allocated from the bottom of the address space and grows upwards. Assuming an architecture like x86 that stack grown downwards from the top of address space, the idea is pretty simple: =============== Highest Address (e.g. 0xFFFF) | | | STACK | | | |————-| <- Stack … Read more

iPhone OS Memory Warnings. What Do The Different Levels Mean?

Memory level warnings are logged by SpringBoard. As an app developer you don’t need to care about it. Just responding to -{application}didReceiveMemoryWarning is enough. There are 4 levels of warnings (0 to 3). These are set from the kernel memory watcher, and can be obtained by the not-so-public function OSMemoryNotificationCurrentLevel(). typedef enum { OSMemoryNotificationLevelAny = … Read more

bds 2006 C hidden memory manager conflicts (class new / delete[] vs. AnsiString)

After extensive debugging i finely isolated the problem. Memory management of bds2006 Turbo C++ became corrupt after you try to call any delete for already deleted pointer. for example: BYTE *dat=new BYTE[10],*tmp=dat; delete[] dat; delete[] tmp; After this is memory management not reliable. (‘new’ can allocate already allocated space) Of course deletion of the same … Read more