| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | intelligent memory alloc |
Thanks Michael for your msg about intelligent memory alloca, on 02 11-02-1994 What compiler are you using? There should be no reason why you cannot malloc() massive amounts of memory under OS/2 (even if there is not enough physical memory to back it up.) It is more efficient to allocate very large buffers via DosAllocMem() if you know you are going to use it all, such as in your bitmap example. But for general purpose usage, you should stick with malloc() (or new if your are in C++ world.) They are not incredibly fast but are portable (and will be improved over time if your compiler vendor is any good.) You can override new in special cases where you have a class that is always a fixed size and gets alloc'd/free'd extremely often. If you do decide to suballocate your own heap, you can use the OS/2 suballocation stuff which, once again, is not the fastest in the world but is already there and debugged. If you do decide how to do it, then you learn about how OS/2 handles sparse memory objects and commits it as needed. ___ X KWQ/2 1.2b X This tagline stolen by KWQ Mail/2. --- Maximus/2 2.02* Origin: Fernwood - your source for OS/2 files! (1:141/209) SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413 SEEN-BY: 711/430 807 808 809 934 942 949 712/353 623 713/888 800/1 @PATH: 141/209 270/101 396/1 3615/50 229/2 12/2442 711/409 54/54 711/808 809 @PATH: 711/934 |
|
| 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™.