JSMallocState.alloc constructor

JSMallocState.alloc(
  1. int mallocCount,
  2. int mallocSize,
  3. int mallocLimit,
  4. Pointer<Void> opaque, {
  5. bool autoDispose = true,
})

Implementation

factory JSMallocState.alloc(
  int mallocCount,
  int mallocSize,
  int mallocLimit,
  Pointer<Void> opaque, {
  bool autoDispose = true,
}) {
  final v = calloc<JSMallocState_>(1);
  v.ref
    ..malloc_count = mallocCount
    ..malloc_size = mallocSize
    ..malloc_limit = mallocLimit
    ..opaque = opaque;
  return JSMallocState._(v, autoDispose: autoDispose);
}