3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-08-10 05:00:52 +00:00
This commit is contained in:
Krystine Sherwin 2024-08-16 04:30:36 +12:00
parent 7b47f645d7
commit 636ce9ac2c
No known key found for this signature in database
2 changed files with 20 additions and 20 deletions

View file

@ -43,7 +43,7 @@ static inline int memReadStat(int field)
pid_t pid = getpid();
int value;
sprintf(name, "/proc/%d/statm", pid);
snprintf(name, 256, "/proc/%d/statm", pid);
FILE* in = fopen(name, "rb");
if (in == NULL) return 0;
@ -60,7 +60,7 @@ static inline int memReadPeak(void)
char name[256];
pid_t pid = getpid();
sprintf(name, "/proc/%d/status", pid);
snprintf(name, 256, "/proc/%d/status", pid);
FILE* in = fopen(name, "rb");
if (in == NULL) return 0;