Re: [cc65] calloc() not failing

From: Kajtár Zsolt <kajtarzsolt1googlemail.com>
Date: 2012-11-13 07:40:01
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


> How can that work? Initialized data is no longer initialized correctly if
> the program runs the second time. That may or may not cause trouble.
> Making the program unrunable needs code and I don't see a reason to place
> this penalty on all programs. If you prefer not to be able to run your
> program again, you may choose to terminate your program by jumping to the
> coldstart vector or whatever. This is what most games do.

?! This sounds like a bug, even if the solution involves wasting the same
amount of memory as the initialized data section. And even more memory is
wasted when someone tries to work this around by initializing variables
explicitly by code.

It should be possible to merge the initializing data with the initialized
variable section to save space as an option for those who know what they do,
but otherwise people are shooting themselves in the foot right now.

Anyway it's just my personal opinion.

- -- 
						    -soci-
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAlCh6yoACgkQyBOVYiJltRaoKACdG1iFk2kHMzOwmFgsUnUtpByD
//cAoN/PzmTKqGRVrLmOO3Mnk9WoHi9g
=kZbd
-----END PGP SIGNATURE-----
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Nov 13 07:40:34 2012

This archive was generated by hypermail 2.1.8 : 2012-11-13 07:40:38 CET