mirror of
https://github.com/oven-sh/bun
synced 2026-02-16 05:42:43 +00:00
[fetch] Fix sporadic data corruption bug in HTTP client and add fast path
- This removes memory pooling from the HTTP client which sometimes caused invalid memory to be written to the response body. - This adds a fast path for small HTTP/HTTPS responses that makes it a single memory allocation for the response body, instead of copying & allocating a temporary buffer cc @Electroid
This commit is contained in:
@@ -436,10 +436,10 @@ pub const VirtualMachine = struct {
|
||||
modules: ModuleLoader.AsyncModule.Queue = .{},
|
||||
aggressive_garbage_collection: GCLevel = GCLevel.none,
|
||||
|
||||
pub const GCLevel = enum {
|
||||
none,
|
||||
mild,
|
||||
aggressive,
|
||||
pub const GCLevel = enum(u3) {
|
||||
none = 0,
|
||||
mild = 1,
|
||||
aggressive = 2,
|
||||
};
|
||||
|
||||
pub threadlocal var is_main_thread_vm: bool = false;
|
||||
|
||||
Reference in New Issue
Block a user