alloc.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
  3. * See the copyright notice in the ACK home directory, in the file "Copyright".
  4. */
  5. /* $Id$ */
  6. #ifndef UTIL_OPT_ALLOC_H
  7. #define UTIL_OPT_ALLOC_H
  8. #define USEMALLOC /* if defined malloc() and free() are used */
  9. #undef COREDEBUG /* keep records and print statistics */
  10. /*
  11. * The next define gives if defined the number of pseudo's outside
  12. * procedures that are collected without processing.
  13. * If undefined all pseudo's will be collected but that may
  14. * give trouble on small machines, because of lack of room.
  15. */
  16. #define PSEUBETWEEN 200
  17. #ifndef USEMALLOC
  18. /*
  19. * Now the real bitsqueezing starts.
  20. * When running on a machine where code and data live in
  21. * separate address-spaces it is worth putting in some extra
  22. * code to save on probably less data.
  23. */
  24. #define SEPID /* code and data in separate spaces */
  25. /*
  26. * If the stack segment and the data are separate as on a PDP11 under UNIX
  27. * it is worth squeezing some shorts out of the stack page.
  28. */
  29. #define STACKROOM 3200 /* number of shorts space in stack */
  30. #else
  31. #define STACKROOM 1 /* 0 gives problems */
  32. #endif /* USEMALLOC */
  33. /* util/opt/alloc.c */
  34. line_p newline(int optyp);
  35. void oldline(line_p lnp);
  36. arg_p newarg(int kind);
  37. void oldargs(arg_p ap);
  38. void oldargb(argb_p abp);
  39. reg_p newreg(void);
  40. void oldreg(reg_p rp);
  41. num_p newnum(void);
  42. void oldnum(num_p lp);
  43. offset *newrom(void);
  44. sym_p newsym(int len);
  45. argb_p newargb(void);
  46. void coreinit(short *p1, short *p2);
  47. short *myalloc(int size);
  48. #endif /* UTIL_OPT_ALLOC_H */