Path: csiph.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Oliver Schmidt Newsgroups: comp.sys.apple2.programmer Subject: Re: malloc with cc65 Date: Thu, 14 Dec 2023 22:34:07 -0000 (UTC) Message-ID: References: <20231214135300.3f65fe0f@smilodon-gracilis> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Injection-Date: Thu, 14 Dec 2023 22:34:07 -0000 (UTC) Injection-Info: solani.org; logging-data="2927788"; mail-complaints-to="abuse@news.solani.org" User-Agent: NewsTap/5.5 (iPhone/iPod Touch) Cancel-Lock: sha1:gF1T1j4oZqsDbJeRE4l0oh4826k= sha1:aKDmXlSL9BCYJ+JHSuWOvzvkPOo= X-User-ID: eJwFwYERACEIBLGWeOFWKAdx7L+ET+R8zA5E6OnZQtItvywmPaFoWUX2yX4e2AzWOu075wf7ABBN Xref: csiph.com comp.sys.apple2.programmer:6280 Hi Bill, > Can cc65 really build dynamically allocated data structures like a > vector or a map, or is it better to use a static implementation? 1. cc65 comes with a fully functional heap manager incl. heap defragmentation. 2. The cc65 optimizer (always compile with -O) knows about "pointer constants" (in contrast to pointer variables) so the code to access them is usually faster/smaller. Regards, Oliver