Skip to content

Commit b35f14d

Browse files
authored
Merge pull request #135 from lightpanda-io/heap_constraint
Expose ResourceConstraints::ConfigureDefaultsFromHeapSize
2 parents f7df436 + e1b5749 commit b35f14d

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/binding.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,13 @@ void v8__Isolate__CreateParams__CONSTRUCT(v8::Isolate::CreateParams* buf) {
303303
new (buf) v8::Isolate::CreateParams();
304304
}
305305

306+
void v8__ResourceConstraints__ConfigureDefaultsFromHeapSize(
307+
v8::ResourceConstraints* self,
308+
size_t initial_heap_size_in_bytes,
309+
size_t maximum_heap_size_in_bytes) {
310+
self->ConfigureDefaultsFromHeapSize(initial_heap_size_in_bytes, maximum_heap_size_in_bytes);
311+
}
312+
306313
const v8::Value* v8__Isolate__ThrowException(
307314
v8::Isolate* isolate,
308315
const v8::Value& exception) {

src/binding.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,11 @@ typedef struct ResourceConstraints {
302302
uint32_t* stack_limit_;
303303
} ResourceConstraints;
304304

305+
void v8__ResourceConstraints__ConfigureDefaultsFromHeapSize(
306+
ResourceConstraints* self,
307+
usize initial_heap_size_in_bytes,
308+
usize maximum_heap_size_in_bytes);
309+
305310
typedef struct CreateParams {
306311
void* code_event_handler; // JitCodeEventHandler
307312
ResourceConstraints constraints;

0 commit comments

Comments
 (0)