Memory allocation = expensive paging is very expensive Tips: Repeated small allocs are slow Reuse allocated blocks or allocate on stack use calloc instead of malloc/memset -- calloc brings pages in lazily allocate lazily Don't leak
Repeated small allocs are slow Reuse allocated blocks or allocate on stack use calloc instead of malloc/memset -- calloc brings pages in lazily allocate lazily Don't leak
Reuse allocated blocks or allocate on stack