Jump to content
  • Advertisement

Archived

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

Jankey

Memmory problems ....

This topic is 6148 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve got a Problem with the Memmory! I try to Allocate some Memory for 3D Models in OpenGL, so i usw the "new" command, the first time when i use the command it works, the second time it does''nt... there is enought free Memmory, and i don''t use Malloc, so where is the Error? J@n

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
double check your numbers, once instead of doing something like new char[end-start], I''ve done new char[start-end] which makes a humongous unsigned number. also, try recompiling and restarting.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
And the Funniest thing is that it allready Worked....
________________________________________________________

// SPLATEN ZEILEN SPITZEN
int numvertex = (res) * (res - 1) + 2;
// MITTELBLATT 2 * SPITZEN
int numfaces = 2 * (res-2) * res + (res * 2);

object.nvertices = numvertex;
object.nfaces = numfaces;

object.pvertices = new Point3f[numvertex+1];
object.pfaces = new Face[numfaces+1];

________________________________________________________

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
im with DireWolf this time

(always anonymous)

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!