4 ms·
Virtual memory can be used as "poor man's GC" only with languages with a variable number of bits in pointers (references). If you have a fixed number of bits in
by knz42 13y ago
Virtual memory can be used as "poor man's GC" only with languages with a variable number of bits in pointers (references). If you have a fixed number of bits in your pointers, like in C & C++, then you will run out of addresses eventually, even with virtual memory.
- rational_indian 13y agoYup! Virtual memory as a poor man's GC seems to be viable for short lived programs with modest virtual memory requirements. I seem to recall Walter Bright using something along the same lines to replace malloc/free in the D compiler code. It lead to a significant improvement in performance.