[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Are there some potential problems if I use a self-defined memory acquirement function instead of realloc(3) in the l_alloc function?
- From: Stefan <ste@...>
- Date: Mon, 10 Aug 2020 14:33:44 +0200
Am 10.08.2020 um 10:32 schrieb 孙世龙 sunshilong:
> Hi, list
> I want to use a self-defined memory acquirement function instead of
> using realloc(3) in the l_alloc function.
> Since I am a newbie, I don't know if there are some potential problems.
> Could somebody shed some light on this problem?
> Thank you for your attention to this matter.
I think Lua relies on the behaviour that the realloc-like function
does not return a different pointer (copy) for shrinking an existing
block. Maybe that could be a problem for some allocators.