27 Sep '17, 9pm

Oh hey I made a blurgh post about visualizing your heap:

Pages aren’t exactly 2 ^ 14 bytes. When we allocate a page, we want that page to be aligned with Operating System memory pages, so the total malloc’d size needs to be some number less than a multiple of 4kb (which is the OS page size). Since the malloc system call has some overhead, we have to subtract some some amount from the actual malloc’d size so that the Ruby page aligns and fits on contiguous OS pages. The padding size we use is sizeof(size_t) * 5 . So the size of a page is actually (2 ^ 14) - (sizeof(size_t) * 5)

Full article: https://tenderlovemaking.com/2017/09/27/visualizing-your-...

Tweets

Visualizing your Ruby Heap

rubyflow.com 28 Sep '17, 10am

× The Ruby and Rails community linklog Made a library? Written a blog post? Found a useful tutorial? Share it with the Rub...

Visualizing Your Ruby Heap

tenderlovemaking.com 27 Sep '17, 9pm

Pages aren’t exactly 2 ^ 14 bytes. When we allocate a page, we want that page to be aligned with Operating System memory p...

Visualizing Your Ruby Heap #ruby #rails

tenderlovemaking.com 30 Sep '17, 4am

Pages aren’t exactly 2 ^ 14 bytes. When we allocate a page, we want that page to be aligned with Operating System memory p...

#ruby #rubyonrails

rubyflow.com 27 Sep '17, 10am

× The Ruby and Rails community linklog Made a library? Written a blog post? Found a useful tutorial? Share it with the Rub...