mirror of
https://github.com/Lizonghang/prima.cpp.git
synced 2025-09-08 15:39:03 +00:00
fix sysctlbyname on Linux and Win
This commit is contained in:
parent
585864b05a
commit
89aad7880e
1 changed files with 3 additions and 0 deletions
|
@ -350,6 +350,7 @@ static bool device_is_docker_container() {
|
||||||
}
|
}
|
||||||
|
|
||||||
static int is_uma_arch() {
|
static int is_uma_arch() {
|
||||||
|
#if defined(__APPLE__) && defined(__MACH__)
|
||||||
int is_arm64 = 0;
|
int is_arm64 = 0;
|
||||||
size_t size = sizeof(is_arm64);
|
size_t size = sizeof(is_arm64);
|
||||||
|
|
||||||
|
@ -359,6 +360,8 @@ static int is_uma_arch() {
|
||||||
}
|
}
|
||||||
|
|
||||||
return is_arm64;
|
return is_arm64;
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static uint64_t device_host_physical_memory(bool available) {
|
static uint64_t device_host_physical_memory(bool available) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue