[self-interest] Memory allocation

Douglas Atique datique at alcatel.com.br
Tue Jul 6 20:06:35 UTC 1999

As far as I know, an object can be allocated in three different ways:
- on the C heap, that is with malloc from the OS
- on the stack
- on the resource area
I understand that objects allocated on the stack are never garbage
collected, because they are on a stack and the garbage collector doesn't
reclaim them. C heap objects seem to be garbage-collectable, at least
the ones allocated on spaces (a space is a kind of a C heap object).
What about resources? It seems that the ResourceArea memory is at first
allocated from the heap, and then it is recycled whenever there is space
for a new resource to be allocated. But are resources reclaimed by the
garbage-collector? I am inclined to say that the GC only happens on
objects allocated inside spaces. Can I do that?
Contributions to the discussion are welcome.


eGroups.com home: http://www.egroups.com/group/self-interest
http://www.egroups.com - Simplifying group communications

More information about the Self-interest mailing list