Centralize things
This commit is contained in:
parent
b4b2d8cec0
commit
bb57350e55
|
@ -0,0 +1,2 @@
|
|||
/.tup
|
||||
/bin
|
5
Tupfile
5
Tupfile
|
@ -1,5 +0,0 @@
|
|||
.gitignore
|
||||
include_rules
|
||||
|
||||
: crypt.nim |> !nim |> crypt
|
||||
: crack.nim |> !nim |> crack
|
|
@ -3,4 +3,4 @@ NIMFLAGS += --deadcodeElim:on
|
|||
#NIMFLAGS += -d:release
|
||||
NIMFLAGS += --verbosity:0
|
||||
|
||||
!nim = |> nim c $(NIMFLAGS) %f && rm -rf .nimcache |>
|
||||
!nim = |> nim c $(NIMFLAGS) -o:%o %f && rm -rf .nimcache |>
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
.gitignore
|
||||
include_rules
|
||||
|
||||
: crypt.nim |> !nim |> ../bin/crypt
|
||||
: crack.nim |> !nim |> ../bin/crack
|
||||
: reaper.c |> gcc -o %o %f |> ../bin/reaper
|
|
@ -0,0 +1,26 @@
|
|||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define AMOUNT 1024*1024*1024
|
||||
|
||||
void * mem[16];
|
||||
|
||||
int main() {
|
||||
int i;
|
||||
for(i=0; i < 16; i++) {
|
||||
mem[i] = malloc(AMOUNT); // One gigabyte XXX do not do this
|
||||
memset(mem[i], 0, AMOUNT);
|
||||
printf("Allocated %d GB of ram...\n", i+1);
|
||||
}
|
||||
|
||||
printf("16 GB of memory used, waiting for input... ");
|
||||
|
||||
while(1) {
|
||||
printf("Trashing ram use...\n");
|
||||
|
||||
for(i=0; i < 16; i++) {
|
||||
memcpy(mem[i], mem[(i+1)%16], AMOUNT);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue