mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-04 12:52:15 +00:00
Fix the hw.realmem sysctl. The global realmem variable is a count of
pages, not a count of bytes. The sysctl handler for hw.realmem already uses ctob() to convert realmem from pages to bytes. Thus, on archs that were storing a byte count in the realmem variable, hw.realmem was inflated. Reported by: Valerio daelli valerio dot daelli at gmail dot com (alpha) MFC after: 3 days
This commit is contained in:
parent
8d40843ab4
commit
414c4ab4c5
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=155680
@ -250,7 +250,7 @@ cpu_startup(dummy)
|
||||
#endif
|
||||
printf("real memory = %ld (%ld MB)\n", alpha_ptob(Maxmem),
|
||||
alpha_ptob(Maxmem) / 1048576);
|
||||
realmem = alpha_ptob(Maxmem);
|
||||
realmem = Maxmem;
|
||||
|
||||
/*
|
||||
* Display any holes after the first chunk of extended memory.
|
||||
|
@ -256,7 +256,7 @@ cpu_startup(dummy)
|
||||
#endif
|
||||
printf("real memory = %ld (%ld MB)\n", ia64_ptob(Maxmem),
|
||||
ia64_ptob(Maxmem) / 1048576);
|
||||
realmem = ia64_ptob(Maxmem);
|
||||
realmem = Maxmem;
|
||||
|
||||
/*
|
||||
* Display any holes after the first chunk of extended memory.
|
||||
|
@ -201,7 +201,7 @@ cpu_startup(void *arg)
|
||||
physsz += sparc64_memreg[i].mr_size;
|
||||
printf("real memory = %lu (%lu MB)\n", physsz,
|
||||
physsz / (1024 * 1024));
|
||||
realmem = (long)physsz;
|
||||
realmem = (long)physsz / PAGE_SIZE;
|
||||
|
||||
vm_ksubmap_init(&kmi);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user