Opened 10 years ago

Closed 10 years ago

#6128 closed bug (fixed)

[PATCH] vm_free_unused_boot_loader_range frees too much memory

Reported by: andreasf Owned by: bonefish
Priority: normal Milestone: R1
Component: System/Kernel Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All


When instructed only to free a certain range start - end=start+size-1 of memory and there are in fact further mappings, end is enlarged.

On ppc, for vm_free_unused_boot_loader_range(0, 0x90000000) I got:

free boot range: also remove 0x86d80000 - 0xfe00ffff

with 0xfe010000 being the start of the next mapping after the one I'm trying to skip.

Attachments (1)

0001-Don-t-free-beyond-the-intended-range.patch (709 bytes ) - added by andreasf 10 years ago.
proposed patch

Download all attachments as: .zip

Change History (6)

by andreasf, 10 years ago

proposed patch

comment:1 by andreasf, 10 years ago

patch: 01

comment:2 by anevilyak, 10 years ago

Owner: changed from axeld to bonefish
Status: newassigned

comment:3 by axeld, 10 years ago

While your observation is certainly correct, it actually shouldn't cause any harm; at least when this function is called, all ranges that are still in use should be covered by an area.

If that isn't the case, there is something wrong else.

in reply to:  3 comment:4 by andreasf, 10 years ago

Please let's discuss the ppc area issues in #5193 or #6105 instead. :)

The point of this bug ticket is solely fixing a behavioral API inconsistency. It does not surface in vanilla Haiku to my knowledge, that's correct. But if there were any code relying on this misbehavior it should rather be fixed!

comment:5 by bonefish, 10 years ago

Resolution: fixed
Status: assignedclosed

Patch applied in hrev37010. Thanks!

Note: See TracTickets for help on using tickets.