[OpenSIPS-Devel] [OpenSIPS/opensips] fb9a37: F_MALLOC: Always perform an O(1) defragmentation o...

Liviu Chircu noreply at github.com
Mon Jun 7 07:34:53 EST 2021


  Branch: refs/heads/master
  Home:   https://github.com/OpenSIPS/opensips
  Commit: fb9a377768f250a8f99a0e29f1fc9689d564dd5c
      https://github.com/OpenSIPS/opensips/commit/fb9a377768f250a8f99a0e29f1fc9689d564dd5c
  Author: Liviu Chircu <liviu at opensips.org>
  Date:   2021-06-07 (Mon, 07 Jun 2021)

  Changed paths:
    M mem/f_malloc.c
    M mem/f_malloc.h
    M mem/f_malloc_dyn.h

  Log Message:
  -----------
  F_MALLOC: Always perform an O(1) defragmentation on free()

Changes:
    * remove the "memory space" runtime computation, as well as the 95%
	defragmentation "start threshold" (better performance!)
    * change the defragmentation heuristic from O(N) to O(1).  This way,
        we avoid any performance issues caused by _too much_
	defragmentation

The main idea is to get rid of the dreaded "not enough shared memory,
attempting defragmentation..." state, where SHM performance goes down
dramatically, to the point where SIP traffic processing may stall.





More information about the Devel mailing list