On Wed, 4 Feb 2004, Arkady V.Belousov wrote: > BO> Anyway, -os -s or -oas -s or -oals -s will generally be smaller. > > Looks like best (default) should be -obhklrs and sometime with > -oami[+]-s? Anyway, ATTRIB.OBJ for -obhklrs-oami+-s (almost) identical to > result with -oxshki+-s.
hmm, I never got any size improvements for b and r. Inlining certainly didn't improve. > BO> perhaps you can replace a few functions by stubs. > > May you offer some ready stubs? I had a quick look at attrib. Its biggest user of space is fopen(). fopen() calls fseek() if "append" is set, so you can stub out fseek() as a no-op. fopen() also calls open(), and open() is quite a big user too; it maintains a dynamic array of file handle states (text/binary and so on); that's where the realloc() comes from. The default array is large enough for attrib though so you can stub realloc() too. Replacements for malloc() and free() will help; don't forget to define _nmalloc as a malloc caller. You'll get significant space savings if you replace fopen()/fgetc()/... by open()/read()/... and even more if you reimplement open() in terms of _dos_open() (likewise for read) and handle CR/LF yourself. try to use "wlink .... symtrace realloc_" and so on to see in the mapfile where it is called from. > PS: Is there option, which equal to "#pragma on (reuse_duplicate_strings)"? i don't know. If it exists it would be explained in cguide.ihp Bart ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ Freedos-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freedos-devel