Lazy Allocation in malloc and calloc

MySprtlty·2024년 7월 22일
0

OS

목록 보기
5/5

Lazy Allocation in malloc and calloc

  • Unlike malloc, calloc initializes memory to zero, so the allocation of physical memory is not deferred.
  • Therefore, while using malloc may result in dropped packets, using calloc usually prevents this.
  • However, this can also vary by implementation.
  • In some implementations, even with calloc, the actual allocation of physical memory may be deferred until the area is accessed.
profile
2Co 4:7

0개의 댓글