Merge pull request 'fix(windows): guard el_mem_check with _WIN32 — rusage is POSIX-only' (#60) from fix/windows-rusage-guard into stage
El SDK CI - stage / build-and-test (push) Failing after 13m21s

fix(windows): guard el_mem_check with _WIN32 — rusage is POSIX-only
This commit was merged in pull request #60.
This commit is contained in:
2026-06-25 16:48:13 +00:00
+5
View File
@@ -5880,6 +5880,10 @@ el_val_t getpid_now(void) {
* Returns 0 always (the only non-return path is the exit() branch).
*/
el_val_t el_mem_check(void) {
#ifdef _WIN32
/* getrusage is POSIX-only — memory guard disabled on Windows. */
return 0;
#else
/* Read limit from env; default 512 MB. */
long limit_mb = 512;
const char *env_val = getenv("ELC_MAX_MEM_MB");
@@ -5905,6 +5909,7 @@ el_val_t el_mem_check(void) {
exit(1);
}
return 0;
#endif
}
/* ── args() — command-line argument access ──────────────────────────────────