Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions src/bun_alloc/MaxHeapAllocator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
use core::alloc::Layout;
use core::ptr::NonNull;

use crate::Allocator;
use crate::MAX_ALIGN_T as MAX_ALIGN;
use crate::{Alignment, Allocator};

/// Owns a single raw `MAX_ALIGN`-aligned buffer (a `Vec<u8>` would allocate
/// with align 1, violating the `alignment <= MAX_ALIGN` contract).
Expand All @@ -23,9 +23,6 @@ unsafe impl Send for MaxHeapAllocator {}
unsafe impl Sync for MaxHeapAllocator {}

impl MaxHeapAllocator {
/// No-op (single owned buffer freed on Drop).
pub fn free(&mut self, _buf: &mut [u8], _alignment: Alignment, _ret_addr: usize) {}

pub(crate) fn reset(&mut self) {
self.len = 0;
}
Expand Down
6 changes: 0 additions & 6 deletions src/bun_alloc/MimallocArena.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,12 +592,6 @@ impl<'a> ArenaString<'a> {
}
}
#[inline]
pub fn with_capacity_in(cap: usize, arena: &'a MimallocArena) -> Self {
Self {
buf: Vec::with_capacity_in(cap, arena),
}
}
#[inline]
pub fn from_str_in(s: &str, arena: &'a MimallocArena) -> Self {
let mut buf = Vec::with_capacity_in(s.len(), arena);
buf.extend_from_slice(s.as_bytes());
Expand Down
56 changes: 0 additions & 56 deletions src/bun_alloc/NullableAllocator.rs

This file was deleted.

4 changes: 0 additions & 4 deletions src/bun_alloc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ pub const USE_MIMALLOC: bool = cfg!(not(bun_asan));
// ── Allocator-vtable modules: per-module disposition (PORTING.md §Allocators) ──
//
// MimallocArena → prefer `bun_alloc::Arena` (= bumpalo::Bump)
// NullableAllocator → prefer `Option<&Arena>` or drop the param
// MaxHeapAllocator → debug-only cap (single-allocation arena)
// heap_breakdown → macOS malloc_zone_* per-tag heaps (debug builds)
// basic → `impl GlobalAlloc for Mimalloc` above is the canonical impl
Expand All @@ -226,8 +225,6 @@ pub const USE_MIMALLOC: bool = cfg!(not(bun_asan));
//
#[path = "MaxHeapAllocator.rs"]
pub mod max_heap_allocator;
#[path = "NullableAllocator.rs"]
pub mod nullable_allocator;
pub mod stack_fallback;

/// Raw alloc/free matching the `#[global_allocator]` (`mi_*` normally, libc under ASAN).
Expand Down Expand Up @@ -356,7 +353,6 @@ pub mod default_alloc {
}

pub use max_heap_allocator::MaxHeapAllocator;
pub use nullable_allocator::NullableAllocator;
pub use stack_fallback::ArenaPtr;

#[path = "MimallocArena.rs"]
Expand Down
8 changes: 0 additions & 8 deletions src/http/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -607,8 +607,6 @@ impl<'a> ThreadlocalAsyncHTTP<'a> {

/// `socket: anytype` in `set_timeout` — minimal trait for what the body calls.
pub trait SocketTimeout {
fn timeout(&self, seconds: core::ffi::c_uint);
fn set_timeout_minutes(&self, minutes: core::ffi::c_uint);
/// Seconds-granularity idle timer. Values >240s are routed onto uSockets'
/// minute-granularity long-timeout wheel; ≤240s use the short-tick timer.
fn set_timeout(&self, seconds: core::ffi::c_uint);
Expand Down Expand Up @@ -1172,12 +1170,6 @@ pub fn configure_http_client_with_alpn(
use bun_http_types::ETag::HeaderEntryColumns;

impl<const SSL: bool> SocketTimeout for HttpSocket<SSL> {
fn timeout(&self, seconds: c_uint) {
uws::NewSocketHandler::<SSL>::timeout(self, seconds)
}
fn set_timeout_minutes(&self, minutes: c_uint) {
uws::NewSocketHandler::<SSL>::set_timeout_minutes(self, minutes)
}
fn set_timeout(&self, seconds: c_uint) {
uws::NewSocketHandler::<SSL>::set_timeout(self, seconds)
}
Expand Down
2 changes: 1 addition & 1 deletion src/ini/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ pub use draft::{
load_npmrc_config,
};
pub mod config_iterator {
pub use super::{ConfigItem as Item, ConfigIterator as Iter, ConfigOpt as Opt};
pub use super::ConfigItem as Item;
}

mod draft {
Expand Down
Loading