mirror of
https://github.com/lightpanda-io/browser.git
synced 2026-03-22 12:44:43 +00:00
Remove custom-arenas, use ArenaPool instead
This removes the browser-specific arenas (session, transfer, page, call) in favor of the arena pool. This is a bit of a win-lose commit. It exists as (the last?) step before I can really start working on frames. Frames will require their own "page" and "call" arenas, so there isn't just 1 per browser now, but rather N, where N is the number of frames + 1 page. This change was already done for Contexts when ExecutionWorld was removed, and the idea is the same: making these units more self contained so to support cases where we break out of the "1" model we currently have (1 browser, 1 session, 1 page, 1 context, ...). But it's a bit of a step backwards because the ArenaPool is dumb and just resets everything to a single hard-coded (for now) value: 16KB. But in my mind, an arena that's used for 1 thing (e.g. the page or call arenas) is more likely to be well-sized for that specific role in the future, even on a different page/navigate. I think ultimately, we'll move to an ArenaPool that has different levels, e.g. acquire() and acquireLarge() which can reset to different sizes, so that a page arena can use acquireLarge() and retain a larger amount of memory between use.
This commit is contained in:
@@ -1255,7 +1255,6 @@ pub const Transfer = struct {
|
||||
client.endTransfer(self);
|
||||
}
|
||||
self.deinit();
|
||||
|
||||
}
|
||||
|
||||
pub fn terminate(self: *Transfer) void {
|
||||
|
||||
Reference in New Issue
Block a user