25 Aug
2010
25 Aug
'10
10:30 p.m.
Hi, Thanks for the swift replies! That clarifies things, reference counting should be fine. Another question on somewhat similar topic. I'll be doing my own management of small structures, and some of them will include the numbers. Is it reasonable to assume that plain copying of (the cl_I) data to increase memory size (via realloc), or when doing garbage-collection, will not break anything? Best, Dejan 2010/8/25 Bruno Haible <bruno@clisp.org>:
No. Every heap-allocated object of CLN has a reference count. Therefore, swapping the contents of two variables really only swaps pointers and is O(1), regardless of the magnitude or precision of the numbers.