C++ code war programs !!!

I

iceColdFire

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
 
A

Alf P. Steinbach

* iceColdFire:
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...

Post some code.
 
I

iceColdFire

::Alf

I have yet to write the code for accessing memory...
The problem is that how do I read memory and write to it..

I am thinking of using pointers...(the only way perhaps) or maybe
malloc or something to write garbage in memory and fill it up but how
do I do this....thats the question ....
 
I

Ioannis Vranos

iceColdFire said:
::Alf

I have yet to write the code for accessing memory...
The problem is that how do I read memory and write to it..

I am thinking of using pointers...(the only way perhaps) or maybe
malloc or something to write garbage in memory and fill it up but how
do I do this....thats the question ....


Apart from seeing no value for such a program, anyway, the best way to learn C++ is to
have a slow, thorough read of an up to date ISO C++ introductory book.
 
R

Rolf Magnus

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 ....

That is system dependant. C++ doesn't give any standard means for that.
I have found that windows dosent allow to fill up entire RAM...

Operating systems that make use of MMUs don't give programs real memory.
They give them virtual memory that parts of might be mapped to real memory.
Every program works in its own virtual memory space, and if it tries to
break out of this, it will get terminated.
 
H

Howard

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,294
Messages
2,571,511
Members
48,206
Latest member
EpifaniaMc

Latest Threads

Top