Skip to content

Commit

Permalink
more memory vistis
Browse files Browse the repository at this point in the history
  • Loading branch information
cirospaciari committed Oct 17, 2024
1 parent b1803af commit db4c0bc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/bun.js/api/bun/socket.zig
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,10 @@ pub const Listener = struct {
return true;
}

pub fn estimatedSize(_: *Listener) callconv(.C) usize {
return @sizeOf(Listener);
}

const UnixOrHost = union(enum) {
unix: []const u8,
host: struct {
Expand Down Expand Up @@ -1385,6 +1389,10 @@ fn NewSocket(comptime ssl: bool) type {
else
JSC.Codegen.JSTLSSocket;

pub fn estimatedSize(_: *This) callconv(.C) usize {
return @sizeOf(This);
}

pub fn hasPendingActivity(this: *This) callconv(.C) bool {
@fence(.acquire);

Expand Down
2 changes: 2 additions & 0 deletions src/bun.js/api/sockets.classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function generate(ssl) {
hasPendingActivity: true,
noConstructor: true,
configurable: false,
estimatedSize: true,
proto: {
getAuthorizationError: {
fn: "getAuthorizationError",
Expand Down Expand Up @@ -188,6 +189,7 @@ export default [
name: "Listener",
noConstructor: true,
JSType: "0b11101110",
estimatedSize: true,
proto: {
stop: {
fn: "stop",
Expand Down

0 comments on commit db4c0bc

Please sign in to comment.