Advertisement

How are things done...The Memory

Started by January 13, 2003 06:21 AM
1 comment, last by cippyboy 22 years, 1 month ago
All i wanted in this post wasto really know who is doing what... I mean like all tyhe variables declared as globals(classes and simple vars) are stored in the RAM right ? Static and unmoveable ? Well the part comes at rendering... I have arrays stored in RAM and I draw them(glDrawElements) does the arrays go into the Video Card or not ? If yes A largeer Memory on the Video Card would be needed right ? What if it exceds the amount alocated ? (Like a 64 MB Scene but a 32MB Card ?) and the Actual RAM... if it is full what happens ? Should I expect a iilegal operation or it is put on the swap file ? By the way how much memory ocupyes a pointer ? 4 bytes ? A pointer to a really big struct is the same ? A vector pointer ?

Relative Games - My apps

quote:
By the way how much memory ocupyes a pointer ? 4 bytes ?



in 32bit windows a pointer does indeed occupy 4 bytes. ie, it''s 32 bit.


quote:
A pointer to a really big struct is the same ? A vector pointer ?



yes. of course.


when it comes to drawElements, the data is transfered over the agp bus for rendering, it most likly will be accessed in blocks. This is why extensions like VAO and VAR make things much faster.
32mb of geometry is a hang of a lot btw... and would be a significant bottle neck.

how memory moves about when a program is running is a lot more complex, with varying levels of caches, ram itself, registers, and of course swap. It''s usually best just to assume it''s all where it needs to be, unless of course you getting 10 thousand page faults a second....

| - Project-X - my mega project.. big things comming soon - | - adDeath - an ad blocker I made - | - email me - |
Advertisement
Not all pointers are 4 bytes, even on 32bit Windows. A pointer to a member function can be up to 20 bytes in size depending on the compiler used.

This topic is closed to new replies.

Advertisement