Page MenuHomeFreeBSD

D27546.diff
No OneTemporary

D27546.diff

Index: sys/amd64/amd64/machdep.c
===================================================================
--- sys/amd64/amd64/machdep.c
+++ sys/amd64/amd64/machdep.c
@@ -234,6 +234,8 @@
{
uintmax_t memsize;
char *sysenv;
+ uintmax_t early_free_count;
+ int indx;
/*
* On MacBooks, we need to disallow the legacy USB circuit to
@@ -284,14 +286,17 @@
/*
* Display any holes after the first chunk of extended memory.
*/
+ early_free_count = 0;
if (bootverbose) {
- int indx;
-
printf("Physical memory chunk(s):\n");
- for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
- vm_paddr_t size;
+ }
+
+ for (indx = 0; phys_avail[indx + 1] != 0; indx += 2) {
+ vm_paddr_t size;
- size = phys_avail[indx + 1] - phys_avail[indx];
+ size = phys_avail[indx + 1] - phys_avail[indx];
+ early_free_count += (uintmax_t)size;
+ if (bootverbose) {
printf(
"0x%016jx - 0x%016jx, %ju bytes (%ju pages)\n",
(uintmax_t)phys_avail[indx],
@@ -303,8 +308,7 @@
vm_ksubmap_init(&kmi);
printf("avail memory = %ju (%ju MB)\n",
- ptoa((uintmax_t)vm_free_count()),
- ptoa((uintmax_t)vm_free_count()) / 1048576);
+ early_free_count, (early_free_count / 1048576));
#ifdef DEV_PCI
if (bootverbose && intel_graphics_stolen_base != 0)
printf("intel stolen mem: base %#jx size %ju MB\n",

File Metadata

Mime Type
text/plain
Expires
Sat, Aug 29, 6:17 AM (14 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37499019
Default Alt Text
D27546.diff (1 KB)

Event Timeline