linux_resource.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* $OpenBSD: linux_resource.h,v 1.2 2003/06/03 20:49:28 deraadt Exp $ */
  2. /*
  3. * Copyright (c) 2000 Niklas Hallqvist
  4. * All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. * 1. Redistributions of source code must retain the above copyright
  10. * notice, this list of conditions and the following disclaimer.
  11. * 2. Redistributions in binary form must reproduce the above copyright
  12. * notice, this list of conditions and the following disclaimer in the
  13. * documentation and/or other materials provided with the distribution.
  14. *
  15. * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
  16. * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
  17. * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  18. * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
  19. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
  20. * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  21. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  22. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  23. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  24. * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. #ifndef _LINUX_RESOURCE_H_
  27. #define _LINUX_RESOURCE_H_
  28. /*
  29. * Resource limits
  30. */
  31. #define LINUX_RLIMIT_CPU 0 /* cpu time in milliseconds */
  32. #define LINUX_RLIMIT_FSIZE 1 /* maximum file size */
  33. #define LINUX_RLIMIT_DATA 2 /* data size */
  34. #define LINUX_RLIMIT_STACK 3 /* stack size */
  35. #define LINUX_RLIMIT_CORE 4 /* core file size */
  36. #define LINUX_RLIMIT_RSS 5 /* resident set size */
  37. #define LINUX_RLIMIT_NPROC 6 /* number of processes */
  38. #define LINUX_RLIMIT_NOFILE 7 /* number of open files */
  39. #define LINUX_RLIMIT_MEMLOCK 8 /* locked-in-memory address space */
  40. #define LINUX_RLIMIT_AS 9 /* address space limit */
  41. #define LINUX_RLIM_NLIMITS 10 /* number of resource limits */
  42. #define LINUX_RLIM_INFINITY 0xFFFFFFFF
  43. #define LINUX_OLD_RLIM_INFINITY 0x7FFFFFFF
  44. struct linux_rlimit {
  45. u_long rlim_cur;
  46. u_long rlim_max;
  47. };
  48. #endif /* !_LINUX_RESOURCE_H_ */