How To Make Kernel Kill OOM Apps

I'm Using Fedora 64bit 3GB of RAM ... so kill this one ..
#include <stdio.h>
#include <stdlib.h>
#define MEGABYTE 1024*1024

int main(int argc, char *argv[]) {
  void *myblock = NULL;
  int count = 0;

  while (1){
    myblock = (void *) malloc(MEGABYTE);
    if (!myblock) break;
    printf("Currently allocating %d MB\n", ++count);


Popular posts from this blog

Fedora 24, Vibrancy-Kali Linux Icon

How To Make IoT Messaging with BashShell

How To Make IoT Tweet with Python