C - Design your own free( ) function

前端 未结 8 1554
感动是毒
感动是毒 2020-12-29 08:27

Today, I appeared for an interview and the interviewer asked me this,

  1. Tell me the steps how will you design your own f
8条回答
  •  难免孤独
    2020-12-29 09:04

    There is an architecture that malloc and free are supposed to adhere to -- essentially a class architecture permitting different strategies to coexist. Then the version of free that is executed corresponds to the version of malloc used.

    However, I'm not sure how often this architecture is observed.

提交回复
热议问题