we could also turn on USE_MMAP by default. all systems should be returning zero pages for new memory. then we only need to worry about manually zero'ing things that are smaller than a page
On Mon Nov 24 2014 at 9:30:46 PM Steven G. Johnson <stevenj....@gmail.com> wrote: > > > On Monday, November 24, 2014 3:05:59 PM UTC-5, Stefan Karpinski wrote: >> >> Using calloc could reduce this significantly since the kernel can lazily >> fill zero pages only when you access them. >> > > Even better, on some systems (e.g. Linux) calloc is implemented via > copy-on-write of a single zero page, so it only needs to fill new zero > pages when you write. > > Unfortunately, Julia allocates 16-byte aligned data by default (to help > SIMD code), and there is no calloc version of posix_memalign as far as I > know. >