strange problem when using new

Started by
4 comments, last by sebb_hysteria 20 years, 7 months ago
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.
Advertisement
Nobody can say much of anything without code and errors/messages.

I like pie.
[sub]My spoon is too big.[/sub]
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.
Post some code and perhaps we can help you.

[How To Ask Questions|STL Programmer''s Guide|Bjarne FAQ|C++ FAQ Lite|C++ Reference|MSDN]
Arguing on the internet is like running in the Special Olympics: Even if you win, you're still retarded.[How To Ask Questions|STL Programmer's Guide|Bjarne FAQ|C++ FAQ Lite|C++ Reference|MSDN]
Leffe, that''s just mean.
daerid@gmail.com
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.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!

This topic is closed to new replies.

Advertisement