Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!liuida!micja From: micja@IDA.LiU.SE (Michael Jansson) Newsgroups: comp.sys.amiga.programmer Subject: Re: Unloading hunks Message-ID: <1991Feb22.112748.13580@ida.liu.se> Date: 22 Feb 91 11:27:48 GMT References: Sender: news@ida.liu.se (News Subsystem) Distribution: comp Organization: CIS Dept, Univ of Linkoping, Sweden Lines: 31 In article rosenber@ra.abo.fi (Robin Rosenberg INF) writes: > >I wonder... >In some applications there is code that is needed only once, such as >initialization code. Assuming that code located into one or more hunks >of their own, is it then _legal_ to unlink these hunks from the segment >list and simply FreeMem() the hunks? > >----- > Robin I think you can achieve the same result by using a c-compiler that can manage segments (hunks). I think that at least Manx can put files in certain hunks which can either be loaded when needed or loaded/freed on demand. I guess that the compiler or some linker library are doing what you suggest, so it ought to be _legal_. They (Manx) probably use FreeSeg (or is it called UnloadSeg?) rather than FreeMem. - Michael PS: I have not actually tried it so this is only speculations. Please let me know if it works. -- ########################################################## # Michael Jansson | \_/ # Internet: mij@IDA.LIU.SE | V _|_ # UUCP: uunet!liuida!mij | | Absolut Software| # BITNET: mij@SELIUIDA | ~~~