Ar an chéad lá de mí Lúnasa, scríobh Vin Shelton:
> The main concern I have is that Aidan admits that the code
hasn't been
> audited for memory leaks, which is always a concern when moving from
> alloca (which is effectively garbage-collected by the stack
> discipline) to malloc. OTOH, byte-compilation is a very rare event;
> any leaks probably will not be noticable.
I guess I should have mentioned that I did the analysis and there are
no alternate return paths from the particular routine in question, so
the malloc'ed space is always free'd.
invalid_byte_code_error _is_ an alternate return path from the routine in
question, and it was that I was worried about.
My main concern was around performance, but as you point out, the
byte
compiler is used somewhat rarely, so I guess I shouldn't worry.
Hmm--the same reasoning applies to leaking memory as a result of
invalid_byte_code_error being called before xfree(), but more so, since the
only people likely to specify invalid byte code to the interpreter are
either working on the interpreter or have just loaded a GNU Emacs
byte-compiled file.
--
Santa Maradona, priez pour moi!