Git Product home page Git Product logo

eatmemory's People

Contributors

jose1711 avatar julman99 avatar zoobab avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

eatmemory's Issues

Create a binary docker image

Hi,

Would it be possible to host a binary docker image on the docker hub?

That would ease the process for people who want to use it.

sysconf not working on AIX - reporting incorrect memory size/free

This is what happens if compiled (gcc8 or xlC) on AIX:

#  ./eatmemory 55M
Currently total memory: -4096
Currently avail memory: -4096
..

This also means that memory size cannot be specified as percentage:

# ./eatmemory 30%
Currently total memory: -4096
Currently avail memory: -4096
Eating -1228 bytes in chunks of 1024...
Done, press any key to free the memory

AIX version: 7200-04

Conflicting options: --rm and -d

Hi,

When I try to run the last example:

$ docker run -d --rm --name hungry_container julman99/eatmemory 128M
Conflicting options: --rm and -d

Do you have the same problem?

Feature request: backgrounding mode

Hi,

Would it be possible to go in background mode and do not read the input from the tty?

For the dockerization, it would be better if there is only one process inside that gets killed if it cannot allocate the memory, or being killed by the linux kernel.

Or maybe an argument to like "-d" to go in daemon mode...

Best,

Query about swapping etc

Just a quick question: how do you ensure that the memory is actually allocated in main RAM? What stops the OS from swapping the memory out? Or pushing it to disk as virtual memory?

docker stats varies through time

Hi,

I have launched a 128MB container as mentioned in the example, right after starting it, docker stats outputs rightly 133MB used, but after a while, it only shows 3 MB.

Any idea why?

When I enter the container, the VmData of the eatmemory process still shows the right value:

$ grep VmData /proc/10/status
VmData: 135184 kB

atoi on AIX translates to 32bit integer value (when specifying memory size in bytes)

https://github.com/julman99/eatmemory/blob/master/eatmemory.c#L85

Even if compiled with -maix64 size always contains 32bit integer which means one cannot allocate more than 2147483647 bytes. Replacing with atol solves the issue.

With atoi (original):

$ ./eatmemory 3000000000000000
Currently total memory: -4096
Currently avail memory: -4096
Eating 2147483647 bytes in chunks of 1024...

With atol (new):

$ eatmemory 3000000000000000
Currently total memory: -4096
Currently avail memory: -4096
Eating 3000000000000000 bytes in chunks of 1024...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.