[splint-discuss] How do I treat a symbol table?
ptp at lysator.liu.se
Tue Aug 23 14:07:17 EDT 2005
On Tue, Aug 23, 2005 at 10:02:37AM -0700, Terry Colligan wrote:
> One of my problems is how to treat a symbol table. I need
> mostly to add malloc'd copies of strings to the symbol table,
> but the symbol table is initialized with some string literals.
> The code:
I looks like you aren't planning to release any of the memory
owned by the symbol table, since you add pointers to string
literals to it with no special markings. Then it doesn't make so
much sense to track the release responsibility (with /*@keep@*/
et.al.). I think there are some splint markups for garbage
collection drive memory handling, so pointers can be used freely
but not for releasing the memory. I have never tried it, I'm not
sure my memory serves me right, and I don't have time to look it
up now, sorry. It's just an idea, not necessarily a good one.
Tommy Pettersson <ptp at lysator.liu.se>
More information about the splint-discuss