Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Roblox
GitHub Repository: Roblox/luau
Path: blob/master/VM/src/lbuffer.h
2725 views
1
// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details
2
#pragma once
3
4
#include "lobject.h"
5
6
// buffer size limit
7
#define MAX_BUFFER_SIZE (1 << 30)
8
9
// GCObject size has to be at least 16 bytes, so a minimum of 8 bytes is always reserved
10
#define sizebuffer(len) (offsetof(Buffer, data) + ((len) < 8 ? 8 : (len)))
11
12
LUAI_FUNC Buffer* luaB_newbuffer(lua_State* L, size_t s);
13
LUAI_FUNC void luaB_freebuffer(lua_State* L, Buffer* u, struct lua_Page* page);
14
15