| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Memory matters |
Hi Roger! :-) BS>> I could limit some of chars hardcoding a value.. But anyway it would be BS>> waste of memory.. RS> I disagree. If you follow the fidonet technical specification the RS> wasted memory would be very minimal. Those bytes would have been RS> important in the days of 640k DOS memory. On a modern Linux or RS> Windows system the little bit of unused padding is inconsequential. There is also the additional benefit of not having to worry about malloc() failing when there is no more memory left (which can happen on heavily loaded machines). If you have char arrays with hardcoded size inside a structure, either you can malloc() the whole thing or you can't. If you can malloc() the structure and then a malloc() for a char pointer inside that fails, you have to do more complicated error recovery. Ciao Pascal --- Msged/LNX 6.1.1* Origin: How you look depends on where you go. (1:153/401.2) SEEN-BY: 633/267 270 @PATH: 153/401 307 140/1 106/2000 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.