Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!elroy.jpl.nasa.gov!sdd.hp.com!spool.mu.edu!cs.umn.edu!kksys!edgar!mmug!UUCP From: Jim.Spencer@p510.f22.n282.z1.fidonet.org.org (Jim Spencer) Newsgroups: comp.sys.mac.programmer Subject: How to malloc memory VERY dynamically and not out of app heap? Message-ID: <669949449.1@mmug.fidonet.org.org> Date: 25 Mar 91 04:03:29 GMT Sender: UUCP@mmug.fidonet.org.org Lines: 18 John T. Nelson writes in a message to All JTN> Now... in order to handle those BIG files this means that I need JTN> an app size that's extremely large (several megabytes) but that JTN> means I cripple the application because then it won't run on JTN> smaller Macs with perhaps only two meg of memory. If I set the JTN> app size too small then it doesn't run on those big files. It JTN> would be nice to newPtr my space from a "free" area whose upper JTN> limit was not fixed and tied to the application's expectations. JTN> JTN> What does one do in these sort of situations or have I missed JTN> something conceptually? I would like to be able to run an app JTN> without telling the OS how much memory I need because I don't JTN> know how much. What you are missing is that if you really plan to handle really big files, on the order of several megabytes, you need to come up with a way to only read part of the file into memory at a time. Even those with lots of RAM won't go for a text processer which needs really huge amounts of memory just so the entire file can be in RAM at the same time.