Skip to content

Commit 5931e4d

Browse files
committed
Checking for 2000 megabytes instead of 2 GiB
1 parent 9b9b362 commit 5931e4d

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

wrapper.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ int sysinfo(struct sysinfo *info){
1212
// we need the real sysinfo function address
1313
pt = dlsym(RTLD_NEXT,"sysinfo");
1414
//printf("pt: %x\n", *(char *)pt);
15-
15+
1616
// call the real sysinfo system call
1717
int real_return_val=((real_sysinfo)pt)(info);
1818

1919
// but then modify its returned totalram field if necessary
20-
// because sqlserver needs to believe it has 2GiB physical
21-
// memory
22-
if( info->totalram < 1024l * 1024l * 1024l * 2l){ // 2GiB
23-
info->totalram = 1024l * 1024l * 1024l * 2l ;
20+
// because sqlserver needs to believe it has "2000 megabytes"
21+
// physical memory
22+
if( info->totalram < 1000l * 1000l * 1000l * 2l){ // 2000 megabytes
23+
info->totalram = 1000l * 1000l * 1000l * 2l ;
2424
}
2525

2626
return real_return_val;

0 commit comments

Comments
 (0)