Archived

This topic is now archived and is closed to further replies.

sebb_hysteria

strange problem when using new

Recommended Posts

sebb_hysteria    122
hi all, i''ve got a very strange problem in my program, sometimes it crashes with a simple call to new. I really don''t know why it doesn''t work. Why calling new could fail ? i don''t think it could be a memory problem, because there''s much memory left when the code crashes. Is there a reason why new could fail ? I use Visual studio 6.0, and the code allways crashes after _heap_alloc_base( ), in NTDLL! ... does anybody got an idea about what this problem could be ? i really need help, i''m so confused with this thanks.

Share this post


Link to post
Share on other sites
Leffe    301
You might need to replace your heap.

Go to your closest computer hardware store and ask them if they have a memory heap, possibly also a new stack.

Alternatively you could just download a new heap from the internet and print it with your printer. Just insert the paper(after some cutting) in your processor and off you go, to the afterworld probably.

Share this post


Link to post
Share on other sites
JohnBolton    1372
quote:
Original post by sebb_hysteria
i''ve got a very strange problem in my program, sometimes it crashes with a simple call to new. I really don''t know why it doesn''t work.



Most likely, the problem is that you are writing past the ends of another allocation and overwriting heap manager data.

Share this post


Link to post
Share on other sites