Skip to content

Commit

Permalink
Optimize comments
Browse files Browse the repository at this point in the history
  • Loading branch information
victoryforce committed Sep 17, 2024
1 parent 359e0ab commit b803888
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions src/win/rlimit.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,34 +20,25 @@

#include <stdio.h>

#define RLIMIT_CPU 0 /* limit on CPU time per process */
#define RLIMIT_FSIZE 1 /* limit on file size */
#define RLIMIT_DATA 2 /* limit on data segment size */
#define RLIMIT_STACK 3 /* limit on process stack size */
#define RLIMIT_CORE 4 /* limit on size of core dump file */
#define RLIMIT_NOFILE 5 /* limit on number of open files */
#define RLIMIT_AS 6 /* limit on process total address space size */
#define RLIMIT_CPU 0 // limit on CPU time per process
#define RLIMIT_FSIZE 1 // limit on file size
#define RLIMIT_DATA 2 // limit on data segment size
#define RLIMIT_STACK 3 // limit on process stack size
#define RLIMIT_CORE 4 // limit on size of core dump file
#define RLIMIT_NOFILE 5 // limit on number of open files
#define RLIMIT_AS 6 // limit on process total address space size
#define RLIMIT_VMEM RLIMIT_AS
#define RLIM_NLIMITS 7
#define RLIM_INFINITY (~0UL)

/*
* process resource limits definitions
*/

struct rlimit
{
// LARGE_INTEGER rlim_cur;
// LARGE_INTEGER rlim_max;
__int64 rlim_cur;
__int64 rlim_max;
__int64 rlim_cur; // current (soft) limit
__int64 rlim_max; // maximum value for rlim_cur (hard limit)
};

typedef struct rlimit rlimit_t;

/*
* Prototypes
*/
int getrlimit(int resource, struct rlimit *);
int setrlimit(int resource, const struct rlimit *);

Expand Down

0 comments on commit b803888

Please sign in to comment.