Mail Archives: djgpp/2002/03/11/06:10:18
On Mon, 11 Mar 2002, Giovanni Spagnuolo wrote:
> cout<<"before allocation"<<endl;
> cout<<_go32_dpmi_remaining_physical_memory()<<endl;
> cout<<_go32_dpmi_remaining_virtual_memory()<<endl<<endl;
>
> int * v = new int[N];
>
> cout<<"after allocation"<<endl;
> cout<<_go32_dpmi_remaining_physical_memory()<<endl;
> cout<<_go32_dpmi_remaining_virtual_memory()<<endl<<endl;
>
> delete [] v;
>
> cout<<"after disallocation"<<endl;
> cout<<_go32_dpmi_remaining_physical_memory()<<endl;
> cout<<_go32_dpmi_remaining_virtual_memory()<<endl<<endl;
>
> return 0;
> }
>
> Nevertheless it seems that the disallocated memory does not become newly
> free.
See section 15.2 of the DJGPP FAQ list, it explains why this is expected
behavior.
What are you trying to accomplish, really? Since this is a toy program,
I assume you have something more serious in mind; if you tell what that
is, perhaps someone can suggest a solution.
- Raw text -