Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created January 13, 2011 21:05
Show Gist options
  • Select an option

  • Save KristianLyng/778604 to your computer and use it in GitHub Desktop.

Select an option

Save KristianLyng/778604 to your computer and use it in GitHub Desktop.
(gdb) call malloc(100)
$1 = (void *) 0xd2a410
(gdb) call ((struct rlimit *)$1).cur_max=100
There is no member named cur_max.
(gdb) call ((struct rlimit *)$1).rlim_cur=100
$2 = 100
(gdb) call ((struct rlimit *)$1).rlim_max=10000
$3 = 10000
(gdb) call setrlimit(7,$1)
$4 = 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment