delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/11/04/18:15:50

Date: Thu, 4 Nov 1993 15:23:09 -0700
From: tesla AT lamar DOT ColoState DOT EDU (Jon Nash)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: New/Delete problems

Hello all,

I've just encountered a problem with memory allocation that seems to be
unique to DJGPP.  In a numerical simulation program that I'm writing I
dynamically allocate necessary memory using new.  Later, I delete it
using delete [] Array or whatever.

My problem is that if I turn around and reallocate some memory - maybe
exactly the same amount, maybe not, the program begins thrashing and swapping
to the HD.

I've compiled this program with TC and it runs fine.  If this problem has
been addressed at an earlier date I apologize for bringing it up again :),
but I don't recall seeing such a problem discussed...

Thanks for any ideas you might have.

Jon Nash
Tesla AT Lamar DOT ColoState DOT EDU

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019