memdur.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /*
  2. * Licensed Materials - Property of IBM and/or HCL
  3. *
  4. * IBM Informix Dynamic Server
  5. * (c) Copyright IBM Corporation 1996, 2004 All rights reserved.
  6. * (c) Copyright HCL Technologies Ltd. 2017. All Rights Reserved.
  7. *
  8. ***************************************************************************
  9. *
  10. * Title: memdur.h
  11. * Description:
  12. * Memory duration defenitions used by mi_* memory routines
  13. * (defined in milib.h) and server internal sapi memory
  14. * routines.
  15. *
  16. ***************************************************************************
  17. */
  18. #ifndef _MEMDUR_H_
  19. #define _MEMDUR_H_
  20. /*
  21. * Memory Durations
  22. * These values are used to indicate which memory pool an allocation
  23. * should come from. For historical reasons they were assigned as unique
  24. * bits, and there is not yet any reason to change this.
  25. */
  26. typedef enum
  27. {
  28. PER_NONE = 0, /* none - unused */
  29. PER_ROUTINE = 1, /* for routine life */
  30. PER_COMMAND = 2, /* for duration of individual SQL command,
  31. statements contain commands */
  32. PER_STMT_92 = 4, /* reserved */
  33. PER_TRANSACTION = 8, /* reserved */
  34. PER_EXCEPTION = 16, /* reserved */
  35. PER_SESSION = 32, /* reserved */
  36. PER_SYSTEM = 64, /* reserved */
  37. PER_STMT_EXEC = 128, /* reserved */
  38. PER_STMT_PREP = 256, /* reserved */
  39. PER_CURSOR = 512, /* reserved */
  40. PER_CONNECTION = 1024, /* reserved */
  41. PER_CDR_OVERRIDE = 2048 /* CDR is overriding SAPI memory */
  42. } MI_MEMORY_DURATION;
  43. /* Alias for PER_FUNCTION */
  44. #define PER_FUNCTION PER_ROUTINE
  45. #define PER_STATEMENT PER_STMT_92
  46. #endif /* _MEMDUR_H_ */