Skip to content

Instantly share code, notes, and snippets.

@microhobby
Created February 26, 2021 20:12
Show Gist options
  • Save microhobby/d03b5199df5e00510ff550db112659dd to your computer and use it in GitHub Desktop.
Save microhobby/d03b5199df5e00510ff550db112659dd to your computer and use it in GitHub Desktop.
Testware
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
int
main(int argc, char **argv)
{
size_t sz = 4000000000;
char *a = malloc(sz);
memset(a, 'a', sz);
printf("%.4s", &a[sz-5]);
sleep(10);
free(a);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment