Skip to main content
GameDev.net gamedev.net
🔒 Locked

CMemoryException

Started by c-mos Oct 10, 2010 at 8:41 PM 0 replies 1.3k views
Original Post
c-mos
c-mos
Hello,

I do surface extraction with marching tetrahedron algorithm. The algorithm works so far. To speed up, the volume has been partionized into octree like structure.
According to the set iso value I have more or less cells that are visible. I distribute those visible cells to my threads. I save the extracted triangles in
a struture and save this struct in a stl::vector. Each thread has it's own vector
so there is no need of sync. If the volume is large, then I get a CMemoryException at almost the end of the extraction process. The exception is raised when I call the push_back method. The same procedure works if I use a smaller volume. And with large volume it also works, If I don't use multiple threads. I don't understand why this happens. Each thread has it's own vector
to save the extracted triangles. I didn't run out of RAM. For large volume the
algorithm needs approx. 1GB of RAM.

any ideas ?

regards,
c-mos
jpetrie
jpetrie
std::vector will never throw an exception of type "CMemoryException," so whatever is throwing it is somewhere else.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.