Skip to content

Instantly share code, notes, and snippets.

@minhaj94
minhaj94 / memory-test.c
Created March 29, 2021 08:11
Script to test memory usage conditions using mlock and mmap.
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <sys/mman.h>
#include <fcntl.h>
void main(int argc, char *argv[])
{
if( argc != 2 ) {