home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 8 Other / 08-Other.zip / S12001.ZIP / HALLOC.TXT < prev    next >
Text File  |  1988-07-08  |  4KB  |  96 lines

  1.  
  2.         Library fix for 4M halloc/_fmalloc limit
  3.  
  4.  
  5.  
  6.    The files on this disk are for use by owners of Microsoft C Optimizing
  7. Compiler only.    These objects may be distributed subject to the restrictions
  8. specified in the Microsoft License Agreement provided with the product.
  9.  
  10. Copyright (c) Microsoft Corp 1984, 1985, 1986, 1987, 1988. All rights reserved.
  11. -----------------------------------------------------------------------------
  12.  
  13.    The _fmalloc (which is equivalent to malloc in large and compact models)
  14. runtime library functions that was released with version 5.1 of the
  15. Microsoft C Optimizing Compiler imposed an arbitrary limit of 4M as the
  16. amount of memory you could allocate in OS/2. In addition, the halloc runtime
  17. library routine imposed a single allocation limit of 4M on memory requests.
  18. The files described below can be used to replace existing modules in your
  19. libraries in order to overcome these limits. The new limit for _fmalloc
  20. is 16M while the new limit on single allocations with halloc is a function
  21. of the operating system; i.e. you can allocate as much memory as OS/2 will
  22. allow.
  23.  
  24.    To update your libraries, you should copy all of the files on this disk
  25. into the same directory as your libraries. Make sure that the library
  26. manager LIB.EXE is also in the current directory or else in your PATH.
  27. You can then run the file LIBFIX.CMD to update your libraries. If you are
  28. running in DOS or in the DOS Compatibility Box in OS/2, you can run the
  29. batch file LIBFIX.BAT.
  30.  
  31.    NOTE1: LIBFIX.CMD and LIBFIX.BAT assume that your protect mode com-
  32. bined libraries use the default naming convention; i.e. that the protect
  33. mode combined library names are of the form:
  34.  
  35. XLIBCYP.LIB
  36.  
  37. where X is the memory model (S,M,C,L) and Y is the floating point option
  38. (E,A,7). For example, LIBFIX will attempt to update the file SLIBCEP.LIB-
  39. the small model emulator library for protect mode. If your protect mode
  40. combined libraries are not of the form given above, it will be necessary
  41. for you to update your libraries manually or else modify the .BAT or .CMD
  42. file so that the proper libraries are updated. A sample command line to
  43. the library manager is:
  44.  
  45. lib -+halloc.s -+crt0.s slibcep.lib ;
  46.  
  47. which will update the small model protect mode combined library. If your
  48. protect mode library has a different name- slibce.lib for example, you
  49. would use the command line:
  50.  
  51. lib -+halloc.s -+crt0.s slibce.lib ;
  52.  
  53.    It is not necessary to update the real mode combined libraries since
  54. the fix to the libraries does not effect programs that use the real mode
  55. libraries.
  56.  
  57.    NOTE2: The library manager will create a backup of each library that
  58. it updates. Once you are satisfied that the update procedure completed
  59. successfully, you can delete the files with the .BAK extension.
  60.  
  61.    Here is a description of the .OBJ files included with this application
  62. note:
  63.  
  64. ============
  65.  
  66.      Replacement modules to fix limit on halloc:
  67.  
  68.     halloc.s    halloc.obj for small model libraries
  69.     halloc.m    halloc.obj for medium model libraries
  70.     halloc.c    halloc.obj for compact model libraries
  71.     halloc.l    halloc.obj for large model libraries including
  72.                    multi-thread and dynamic link libraries
  73. ============
  74.  
  75.      Replacement modules to fix limit on _fmalloc:
  76.  
  77.     crt0.s        crt0.obj for small model libraries
  78.     crt0.m        crt0.obj for medium model libraries
  79.     crt0.c        crt0.obj for compact model libraries
  80.     crt0.l        crt0.obj for large model libraries
  81.     crt0.mt     crt0.obj for multi-thread support library LLIBMT.LIB
  82.     crt0.cdl    crt0.obj for multi-thread DLL library CDLLOBJS.LIB
  83.     csu.dll     crt0.obj for single thread DLL library LLIBCDLL.LIB
  84.  
  85. -----------------------------------------------------------------------------
  86.  
  87.    If you are using _fmalloc and you require more than 16M of memory,
  88. you can edit the file BRKCTL.INC which is included with the startup
  89. source code. You will need to change the value MAXSEG_PM in this file
  90. and then rebuild the appropriate modules as outlined in the README.DOC
  91. that is included in the startup code directory. This value was originally
  92. 64; the CRT0.OBJ modules on this disk were assembled with the value of
  93. MAXSEG_PM set to 256. If the startup code is not on your hard disk, you
  94. will need to go through the C 5.1 Setup procedure again and choose the
  95. option to copy the startup code to your hard disk.
  96.