home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / std_unix / mod.std.unix.v1 / text0044.txt < prev    next >
Encoding:
Text File  |  1987-06-30  |  1.4 KB  |  34 lines

  1. ----------------------------------------------------------------------
  2.  
  3. Date: Wed, 31 Jul 85 13:14:10 edt
  4. From: Arnold Robbins <gatech!arnold>
  5. Subject: Storage allocators
  6. To: cbosgd!std-c, ut-sally!std-unix
  7. Keywords: stack allocation, standardizing undocumented features
  8.  
  9. Unix has long had an undocumented routine alloca(), which allocates
  10. storage off the stack.  This storage then goes away when the function
  11. returns.
  12.  
  13. I would like to see this documented in the Unix standard under development,
  14. and also included in the new ANSI C standard.  I would suggest that
  15. the name get changed to something like salloc() [stack alloc], with
  16. semantics similar to malloc (returned storage probably initialized to
  17. garbage), only the storage is temporary, not permanent.
  18.  
  19. I think that cross posting to both groups is appropriate, since C supports
  20. variables on the stack, so I doubt that there are many machines which can't
  21. do alloca(), and for Unix, it comes down to documenting something that
  22. has been there for a long time.
  23.  
  24. ------------------------------
  25.  
  26. Discussions-Of: UNIX standards, particularly the IEEE P1003 draft standard.
  27. Submissions-To:    ut-sally!std-unix    or std-unix@ut-sally.ARPA
  28. Comments-To: ut-sally!std-unix-request    or std-unix-request@ut-sally.ARPA
  29. UUCP-Routes: {ihnp4,seismo,harvard,gatech}!ut-sally!std-unix
  30. Archives-In: ~ftp/pub/mod.std.unix on ut-sally.ARPA (soon sally.UTEXAS.EDU)
  31.  
  32. Volume-Number: Volume 1, Number 45
  33.  
  34.