Compare commits
4 Commits
prerelease
...
prerelease
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dab86925b4 | ||
|
|
0f45052dce | ||
|
|
68f4207216 | ||
|
|
f9f8ca08c6 |
7
Makefile
7
Makefile
@@ -24,9 +24,12 @@ $(BINARY): $(CFILES) $(LEXER_C) $(LEXER_H)
|
|||||||
gcc -O3 -o $(BINARY) $(CFILES) $(CFLAGS) -s
|
gcc -O3 -o $(BINARY) $(CFILES) $(CFLAGS) -s
|
||||||
|
|
||||||
windows: $(CFILES) $(LEXER_C) $(LEXER_H)
|
windows: $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||||
find external/xxhash external/cwalk external/libdye src -name '*.c' > sources.txt
|
(echo -n "external/xxhash/xxhash.c " ; \
|
||||||
|
echo -n "external/cwalk/src/cwalk.c " ; \
|
||||||
|
echo -n "external/libdye/src/dye.c " ; \
|
||||||
|
find src -name '*.c' -print0 | xargs -0 echo -n) > sources.txt
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
gcc -O3 -march=native -o $(BINARY) @sources.txt $(CFLAGS)
|
gcc -O3 -march=native -o $(BINARY) @sources.txt $(CFLAGS) -lbcrypt
|
||||||
|
|
||||||
native: $(CFILES) $(LEXER_C) $(LEXER_H)
|
native: $(CFILES) $(LEXER_C) $(LEXER_H)
|
||||||
mkdir -p bin
|
mkdir -p bin
|
||||||
|
|||||||
@@ -16,8 +16,11 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
#include <psapi.h>
|
#ifndef _WIN32_WINNT
|
||||||
|
#define _WIN32_WINNT 0x0602
|
||||||
|
#endif
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <psapi.h>
|
||||||
|
|
||||||
double get_memory_usage_mb() {
|
double get_memory_usage_mb() {
|
||||||
PROCESS_MEMORY_COUNTERS pmc;
|
PROCESS_MEMORY_COUNTERS pmc;
|
||||||
|
|||||||
Reference in New Issue
Block a user