By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,778 Members | 2,015 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,778 IT Pros & Developers. It's quick & easy.

eating memory

P: n/a
Hi there,

I want to write a program in vc++ that can read or even delete random
memory addresses. Anyone know how to generate something like this? I
want to make a program that like "eats" the memory from a computer,
not for a virus, but for a AI program and i want it to feed itself
with memory :p.

Me

Mar 15 '07 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On 15 Mar 2007 07:06:12 -0700
la******@gmail.com wrote:
Hi there,

I want to write a program in vc++ that can read or even delete random
memory addresses. Anyone know how to generate something like this? I
want to make a program that like "eats" the memory from a computer,
not for a virus, but for a AI program and i want it to feed itself
with memory :p.

Me
perhaps something like that?
--
Simon Wollwage <Si************@rwth-aachen.de>
Mar 15 '07 #2

P: n/a
On 15 Mar 2007 07:06:12 -0700
la******@gmail.com wrote:
Hi there,

I want to write a program in vc++ that can read or even delete random
memory addresses. Anyone know how to generate something like this? I
want to make a program that like "eats" the memory from a computer,
not for a virus, but for a AI program and i want it to feed itself
with memory :p.

Me
sry, new try:

perhaps something like that?

void *p = random(100000);
delete p;

--
Simon Wollwage <Si************@rwth-aachen.de>
Mar 15 '07 #3

P: n/a
On Thu, 15 Mar 2007 15:10:31 +0100
Simon Wollwage <Si************@rwth-aachen.dewrote:
On 15 Mar 2007 07:06:12 -0700
la******@gmail.com wrote:
Hi there,

I want to write a program in vc++ that can read or even delete random
memory addresses. Anyone know how to generate something like this? I
want to make a program that like "eats" the memory from a computer,
not for a virus, but for a AI program and i want it to feed itself
with memory :p.

Me
sry, new try:

perhaps something like that?

void *p = random(100000);
delete p;

--
Simon Wollwage <Si************@rwth-aachen.de>
again:

void *p;
p = random(100000);
delete p;

this looks much better ^^
--
Simon Wollwage <Si************@rwth-aachen.de>
Mar 15 '07 #4

P: n/a
la******@gmail.com wrote:
Hi there,

I want to write a program in vc++
So, write it, why don't you?
that can read or even delete random
memory addresses. Anyone know how to generate something like this? I
want to make a program that like "eats" the memory from a computer,
not for a virus, but for a AI program and i want it to feed itself
with memory :p.
'new' allocates memory. Don't release it and your program will own
that memory while it's running. There is nothing in the language
that could help you retain the ownership of that memory _after_ your
program ends, if there is a way it would be system-specific.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
Mar 15 '07 #5

P: n/a
Perhaps this function may help you? :

http://msdn2.microsoft.com/en-us/library/ms681674.aspx

Mar 15 '07 #6

P: n/a
la******@gmail.com wrote:
Hi there,

I want to write a program in vc++ that can read or even delete random
memory addresses. Anyone know how to generate something like this? I
want to make a program that like "eats" the memory from a computer,
not for a virus, but for a AI program and i want it to feed itself
with memory :p.

Me
Seriously, you can possibly read from, and write to, a memory address
but what do you mean by deleting it?

Ben
Mar 16 '07 #7

This discussion thread is closed

Replies have been disabled for this discussion.