QNX RTOS v4 Knowledge Base
QNX RTOS v4 Knowledge Base
Title |
De-allocating memory doesn't change 'sin' output |
Ref. No. |
QNX.000009683 |
Category(ies) |
Utilities |
Issue |
When allocating data space (with c++ new instruction), we use 'sin' and see that we use more data space. However, when we delete the allocated space, 'sin' doesn't show that the data space has been decremented. Shouldn't we see it?
|
Solution |
No, not by using 'sin'. The program heap has grown with the new() function call (the OS has given it another chunk of memory), but the delete only releases the memory back to the heap and not to the OS. The program still has the memory as part of it's data segment. |
|