iceColdFire said:
Hi,
I am trying to build c++ autonomous modules,,,then all these modules
shall be launched in memory...
The goal is going to be which module fills up the memory the
fastest...here memory is RAM...
ANy suggestions of accessing full RAM ....I have found that windows
dosent allow to fill up entire RAM...
Suggestions required...
Thanks.
a.a.cpp
I'm unsure what you mean by "filling up memory". Memory is already "full",
in the sense that it contains 1s or 0s. What about it do you want to change
that makes it become "full"?
As you've seen, the OS will not allow you to write over all RAM. There's
good reason for that...the OS operates on instructions stored in that very
same RAM! If you were allowed to write anywhere you pelased, at some point
the OS would crash. And before that, your "modules" may cease to function,
since they also require RAM.
If you're envisioning something like the CoreWars competition, where objects
in memory compete with each other to take over memory, then you should take
the same approach they did... simulate your complete address space with an
allocated array of memory. It won't matter that it's not really ALL of RAM.
Just provide the modules with a shared object or some kind of command
interface which restricts their attacks to your main program's array.
If, on the other hand, you're trying to come up with some kind of *real*
attack method, such as a virus or worm might use, then forget it...we only
help people play nice here!
-Howard