[splint-discuss] How do I treat a symbol table?
Imhoff, Luke
luke.w.imhoff at medtronic.com
Tue Aug 23 14:16:59 EDT 2005
I think /*@share@*/ is the recommended garbage collected annotation.
-----Original Message-----
From: splint-discuss-bounces at cs.virginia.edu
[mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of Tommy
Pettersson
Sent: Tuesday, August 23, 2005 1:07 PM
To: splint-discuss at ares.cs.Virginia.EDU
Cc: terryc at tenberry.com
Subject: Re: [splint-discuss] How do I treat a symbol table?
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>
_______________________________________________
splint-discuss mailing list
splint-discuss at ares.cs.Virginia.EDU
http://www.cs.Virginia.EDU/mailman-2.1.5/listinfo/splint-discuss
More information about the splint-discuss
mailing list