Re: [Midnight Commander] #125: allocate and free memory via mc-wrappers

#125: allocate and free memory via mc-wrappers
  Reporter:  slavazanko   |       Owner:        
      Type:  enhancement  |      Status:  new   
  Priority:  major        |   Milestone:  4.6.2 
 Component:  mc-core      |     Version:  4.6.1 
Resolution:               |    Keywords:  memory
  Blocking:               |   Blockedby:        

Comment(by Enrico Weigelt):

 * Ticket System <tickets midnight-commander org> schrieb:

 ACK. But I'd like to go some steps further:

 * introduce new macros
     MC_MEM_ALLOC_Z()    -> alloc on heap, zero'ing
     MC_MEM_ALLOC_U()    -> alloc on heap, uninitialized
     MC_MEM_FREE()       -> free from stack
     MC_MEM_REALLOC()    -> re-allocate (added space uninitialized)
     MC_STACK_ALLOC()    -> allocate on stack

 * replace all other calls to malloc()+friends, mc_alloc()+co,
   by calling these macros

 Could also be put into src/util.h
 (BTW: we dont need any .c file for that)


 What should this mcglib actually contain ?


Ticket URL: <>
Midnight Commander <>
Midnight Development Center

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]