Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Memory related (non-GC version) macros are deprecated and will be removed. #727

Open
bacek opened this Issue Mar 5, 2012 · 1 comment

Comments

Projects
None yet
2 participants
Member

bacek commented Mar 5, 2012

Hello.

Next macros:

define mem_sys_memcopy memcpy

define mem_sys_memmove memmove

define mem_allocate_typed(type) (type *)mem_sys_allocate(sizeof (type))

define mem_allocate_n_typed(n, type) (type *)mem_sys_allocate((n) * sizeof (type))

define mem_allocate_zeroed_typed(type) (type *)mem_sys_allocate_zeroed(sizeof (type))

define mem_allocate_n_zeroed_typed(n, type) (type *)mem_sys_allocate_zeroed((n) * sizeof (type))

define mem_realloc_n_typed(p, n, type) (p) = (type *)mem_sys_realloc((p), (n) * sizeof (type))

have nothing to do with parrot functionality and just custom macros for malloc/free. They are not part of parrot's provided facilities and will be removed.

Functions mem_sys_allocate, mem_sys_reallocate and mem_sys_free will be also removed.

Any HLL should move to use:

  1. Standard malloc/free functions.
  2. Or better, GC backed mem_gc_* macros.

Bacek

Contributor

petdance commented Mar 5, 2012

I'd be glad to help out on this. I've long wanted to get rid of these guys to make splint happier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment