[Midnight Commander] #125: allocate and free memory via mc-wrappers
Ticket System
tickets at midnight-commander.org
Thu Jan 8 18:09:12 UTC 2009
#125: allocate and free memory via mc-wrappers
--------------------------+-------------------------------------------------
Reporter: slavazanko | Owner: slavazanko
Type: enhancement | Status: accepted
Priority: major | Milestone: 4.7
Component: mc-core | Version: 4.6.1
Resolution: | Keywords: memory
Blocking: | Blockedby:
--------------------------+-------------------------------------------------
Comment(by metux):
meanwhile I've moved some steps further:
some .h files with macros+inlines in the ./mhl/ subdir
("micro helper library").
for example mhl/memory.h provides things like
mhl_mem_alloc_u(): alloc on heap, unitialized
mhl_mem_alloc_z(): alloc on heap, zero'd
mhl_mem_free(): free from heap
mhl_stack_alloc(): allocate on stack (uninitialized)
and mhl/string.h has eg:
mhl_str_dup(): safe strdup() (NULL->"")
mhl_str_ndup(): safe strndup()
mhl_str_concat_1(): cat 1 string onto some base str
mhl_str_concat_2(): cat 2 strings onto some base str
...
--
Ticket URL: <www.midnight-commander.org/ticket/125#comment:6>
Midnight Commander <www.midnight-commander.org>
Midnight Development Center
More information about the mc-devel
mailing list