Skip to content

Instantly share code, notes, and snippets.

View aaronmussig's full-sized avatar

Aaron Mussig aaronmussig

  • Australian Centre for Ecogenomics
  • Brisbane, Australia
  • 05:19 (UTC +10:00)
  • X @aaronmussig
View GitHub Profile
@aaronmussig
aaronmussig / memtest.c
Created October 29, 2020 01:59
Progressively request memory up to the specified GB (e.g. "./memtest 5" will try allocate up to 5 GB of memory).
#include <stdio.h>
#include <stdlib.h>
int main( int argc, char *argv[] ) {
// Check input arguments.
if(argc<=1) {
printf("Please provide the maximum number of GB to allocate, e.g.: ./memtest 5");
exit(1);
}