mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
Fix heap snapshots memory usage stats. Introduce estimateDirectMemoryUsageOf function in "bun:jsc" (#15790)
This commit is contained in:
@@ -73,6 +73,10 @@ public:
|
||||
DROPPED
|
||||
};
|
||||
|
||||
size_t memoryCost() {
|
||||
return getBufferedAmount() + sizeof(WebSocket);
|
||||
}
|
||||
|
||||
/* Sending fragmented messages puts a bit of effort on the user; you must not interleave regular sends
|
||||
* with fragmented sends and you must sendFirstFragment, [sendFragment], then finally sendLastFragment. */
|
||||
SendStatus sendFirstFragment(std::string_view message, OpCode opCode = OpCode::BINARY, bool compress = false) {
|
||||
|
||||
Reference in New Issue
Block a user