⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 erl_alloc.types

📁 OTP是开放电信平台的简称
💻 TYPES
字号:
# ``The contents of this file are subject to the Erlang Public License,# Version 1.1, (the "License"); you may not use this file except in# compliance with the License. You should have received a copy of the# Erlang Public License along with this software. If not, it can be# retrieved via the world wide web at http://www.erlang.org/.## Software distributed under the License is distributed on an "AS IS"# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See# the License for the specific language governing rights and limitations# under the License.## The Initial Developer of the Original Code is Ericsson Utvecklings AB.# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings# AB. All Rights Reserved.''##     $Id$### Rules:# * Types, allocators, and classes can be declared.# * Types, allocators, classes, and descriptions can only contain#   alphanumeric characters.# * Allocators and classes have to be declared before they are used in#   type declarations.# * Descriptions have only one name space (i.e. class descriptions,#   allocator descriptions, and type descriptions are all in the same#   name space).# * Types, allocators, classes, and descriptions have different name#   spaces.# * The type, allocator, and class names INVALID are reserved and can#   not be used.# * The descriptions invalid_allocator, invalid_class, and invalid_type#   are reserved and can not be used.# * Declarations can be done conditionally by use of a#     +if <boolean_variable>##     +else##     +endif#   or a#     +ifnot <boolean_variable>##     +else##     +endif#   construct (else branches are optional). The boolean variable X is#   true after a "+enable X" statement or if it has been passed as a#   command line argument to make_alloc_types. The variable X is false#   after a "+disable X" statement or if it has never been mentioned.# --- Allocator declarations -------------------------------------------------## If, and only if, the same thread performes *all* allocations,# reallocations and deallocations of all memory types that are handled# by a specific allocator (<ALLOCATOR> in type declaration), set # <MULTI_THREAD> for this specific allocator to false; otherwise, set# it to true.## Syntax: allocator <ALLOCATOR> <MULTI_THREAD> <DESCRIPTION>##		<ALLOCATOR>	<MULTI_THREAD>	<DESCRIPTION>+if smpallocator	SYSTEM		true		sys_allocallocator	TEMPORARY	true		temp_allocallocator	SHORT_LIVED	true		sl_allocallocator	STANDARD	true		std_allocallocator	LONG_LIVED	true		ll_allocallocator	EHEAP		true		eheap_alloc				# Binary alloc has its own thread				# safety implementationallocator	BINARY		false		binary_allocallocator	ETS		true		ets_allocallocator	FIXED_SIZE	true		fix_alloc+else # Non smp buildallocator	SYSTEM		true		sys_allocallocator	TEMPORARY	false		temp_allocallocator	SHORT_LIVED	false		sl_allocallocator	STANDARD	false		std_allocallocator	LONG_LIVED	false		ll_allocallocator	EHEAP		false		eheap_alloc				# Binary alloc has its own thread				# safety implementationallocator	BINARY		false		binary_allocallocator	ETS		false		ets_allocallocator	FIXED_SIZE	false		fix_alloc+endif# --- Class declarations -----------------------------------------------------## Syntax: class <CLASS> <DESCRIPTION>##	<CLASS>		<DESCRIPTION>class	PROCESSES	process_dataclass	ATOM		atom_dataclass	CODE		code_dataclass	ETS		ets_dataclass	BINARIES	binary_dataclass	SYSTEM		system_data# --- Type declarations ------------------------------------------------------# # Syntax: type <TYPE> <ALLOCATOR> <CLASS> <DESCRIPTION>## Use ERTS_ALC_T_<TYPE> as first parameter to erts_alloc(), erts_alloc_fnf(),# erts_realloc(), erts_realloc_fnf() or erts_free() in order to allocate,# reallocate or deallocate a memory block of type <TYPE>.## NOTE: Only use temp_alloc for memory types that *really* are *temporarily*#	allocated. A good thumb rule: all memory allocated by temp_alloc#       should be deallocated before the emulator starts executing Erlang#       code again.## NOTE: When adding or removing a type which uses the FIXED_SIZE allocator,#       also add or remove initialization of the type in erts_alloc_init()#       (erl_alloc.c).##	<TYPE>		<ALLOCATOR>	<CLASS>		<DESCRIPTION>type	PROC		FIXED_SIZE	PROCESSES	proctype	ATOM		FIXED_SIZE	ATOM		atom_entrytype	EXPORT		FIXED_SIZE	CODE		export_entrytype	MODULE		FIXED_SIZE	CODE		module_entrytype	REG_PROC	FIXED_SIZE	PROCESSES	reg_proctype	LINK_LH		STANDARD	PROCESSES	link_lhtype	MONITOR_SH	FIXED_SIZE	PROCESSES	monitor_shtype	MONITOR_LH	STANDARD	PROCESSES	monitor_lhtype	NLINK_SH	FIXED_SIZE	PROCESSES	nlink_shtype	NLINK_LH	STANDARD	PROCESSES	nlink_lhtype	PROC_LIST	FIXED_SIZE	PROCESSES	proc_listtype	FUN_ENTRY	FIXED_SIZE	CODE		fun_entrytype	ATOM_TXT	LONG_LIVED	ATOM		atom_texttype	HEAP		EHEAP		PROCESSES	heaptype	OLD_HEAP	EHEAP		PROCESSES	old_heaptype	HEAP_FRAG	EHEAP		PROCESSES	heap_fragtype	MSG_REF		SHORT_LIVED	PROCESSES	msg_reftype	MSG_ROOTS	TEMPORARY	PROCESSES	msg_rootstype	ROOTSET		TEMPORARY	PROCESSES	root_settype	LOADER_TMP	TEMPORARY	CODE		loader_tmptype	BIF_TIMER_TABLE	LONG_LIVED	SYSTEM		bif_timer_tabletype	SL_BIF_TIMER	SHORT_LIVED	PROCESSES	bif_timer_sltype	LL_BIF_TIMER	STANDARD	PROCESSES	bif_timer_lltype	REG_TABLE	STANDARD	SYSTEM		reg_tabtype	FUN_TABLE	STANDARD	CODE		fun_tabtype	DIST_TABLE	STANDARD	SYSTEM		dist_tabtype	NODE_TABLE	STANDARD	SYSTEM		node_tabtype	ATOM_TABLE	LONG_LIVED	ATOM		atom_tabtype	EXPORT_TABLE	LONG_LIVED	CODE		export_tabtype	MODULE_TABLE	LONG_LIVED	CODE		module_tabtype	MODULE_REFS	STANDARD	CODE		module_refstype	NC_TMP		TEMPORARY	SYSTEM		nc_tmptype	TMP		TEMPORARY	SYSTEM		tmptype	UNDEF		SYSTEM		SYSTEM		undefinedtype	DCACHE		STANDARD	SYSTEM		dcachetype	DCTRL_BUF	TEMPORARY	SYSTEM		dctrl_buftype	DIST_ENTRY	STANDARD	SYSTEM		dist_entrytype	NODE_ENTRY	STANDARD	SYSTEM		node_entrytype	PROC_TABLE	LONG_LIVED	PROCESSES	proc_tabtype	PORT_TABLE	LONG_LIVED	SYSTEM		port_tabtype	TIMER_WHEEL	LONG_LIVED	SYSTEM		timer_wheeltype	DRV		SYSTEM		SYSTEM		drv_internaltype	DRV_BINARY	BINARY		BINARIES	drv_binarytype	DRV_ENTRY_LIST	STANDARD	SYSTEM		drv_entry_listtype	BINARY		BINARY		BINARIES	binarytype	NBIF_TABLE	SYSTEM		SYSTEM		nbif_tabtype	CODE		LONG_LIVED	CODE		codetype	ARG_REG		STANDARD	PROCESSES	arg_regtype	PROC_DICT	STANDARD	PROCESSES	proc_dicttype	CALLS_BUF	STANDARD	PROCESSES	calls_buftype	BPD		STANDARD	SYSTEM		bpdtype	PORT_NAME	STANDARD	SYSTEM		port_nametype	LINEBUF		STANDARD	SYSTEM		line_buftype	IOQ		STANDARD	SYSTEM		io_queuetype	BITS_BUF	STANDARD	SYSTEM		bits_buftype	TMP_DIST_BUF	TEMPORARY	SYSTEM		tmp_dist_buftype	ASYNC		SYSTEM		SYSTEM		asynctype	ASYNC_Q		LONG_LIVED	SYSTEM		async_queuetype	ESTACK		TEMPORARY	SYSTEM		estacktype	PORT_CALL_BUF	STANDARD	SYSTEM		port_call_buftype	DB_TABLE	FIXED_SIZE	ETS		db_tabtype	DB_FIXATION	SHORT_LIVED	ETS		db_fixationtype	DB_FIX_DEL	SHORT_LIVED	ETS		fixed_deltype	DB_TABLES	LONG_LIVED	ETS		db_tabstype	DB_TMP		TEMPORARY	ETS		db_tmptype	DB_MC_STK	TEMPORARY	ETS		db_mc_stacktype	DB_MS_PSDO_PROC	LONG_LIVED	ETS		db_match_pseudo_proctype	DB_MS_RUN_HEAP	SHORT_LIVED	ETS		db_match_spec_run_heaptype	DB_MS_CMPL_HEAP	TEMPORARY	ETS		db_match_spec_cmpl_heaptype	DB_SEG		ETS		ETS		db_segmenttype	DB_SEG_TAB	ETS		ETS		db_segment_tabtype	DB_STK		ETS		ETS		db_stacktype	DB_TRANS_TAB	ETS		ETS		db_trans_tabtype	DB_SEL_LIST	ETS		ETS		db_select_listtype	DB_DMC_ERROR	ETS		ETS		db_dmc_errortype	DB_DMC_ERR_INFO	ETS		ETS		db_dmc_error_infotype	DB_TERM		ETS		ETS		db_termtype	INSTR_INFO	LONG_LIVED	SYSTEM		instr_infotype	LOGGER_DSBUF	TEMPORARY	SYSTEM		logger_dsbuftype	TMP_DSBUF	TEMPORARY	SYSTEM		tmp_dsbuftype	INFO_DSBUF	SYSTEM		SYSTEM		info_dsbuf# INFO_DSBUF have to use the SYSTEM allocator; otherwise, a deadlock might occurtype	SCHDLR_DATA	LONG_LIVED	PROCESSES	scheduler_datatype	DDLL_PROCESS	STANDARD	SYSTEM		ddll_processestype	DDLL_HANDLE	STANDARD	SYSTEM		ddll_handletype	DDLL_ERRCODES	LONG_LIVED	SYSTEM		ddll_errcodestype	DDLL_TMP_BUF	TEMPORARY	SYSTEM		ddll_tmp_buftype	PORT_TASK	SHORT_LIVED	SYSTEM		port_tasktype	PORT_TASKQ	SHORT_LIVED	SYSTEM		port_task_queuetype	MISC_OP_LIST	SHORT_LIVED	SYSTEM		misc_op_listtype	PORT_NAMES	SHORT_LIVED	SYSTEM		port_namestype	PORT_DATA_LOCK	STANDARD	SYSTEM		port_data_locktype	NODES_MON	STANDARD	PROCESSES	nodes_monitor+if smptype	PORT_LOCK	STANDARD	SYSTEM		port_locktype	DRIVER_LOCK	STANDARD	SYSTEM		driver_locktype	XPORTS_LIST	SHORT_LIVED	SYSTEM		extra_port_list+endif## Types used for special emulators#+if threadstype	ETHR_INTERNAL	SYSTEM		SYSTEM		ethread_internal+endif+if shared_heaptype	STACK		STANDARD	PROCESSES	stacktype	ACTIVE_PROCS	STANDARD	PROCESSES	active_procs+endif+if hybridtype	ACTIVE_PROCS	STANDARD	PROCESSES	active_procs# Used for all memory involved in incremental gc of the message area# that is, young (x2) and old generation, forwarding pointers and blackmaptype	MESSAGE_AREA	LONG_LIVED	PROCESSES	message_area# Used in MA_STACK (global.h) and INC_STORAGE (erl_nmgc.h)type	OBJECT_STACK	STANDARD	PROCESSES	object_stack+endif+if smptype	SL_PTIMER	SHORT_LIVED	SYSTEM		ptimer_sltype	LL_PTIMER	STANDARD	SYSTEM		ptimer_lltype	SYS_MSG_Q	SHORT_LIVED	PROCESSES	system_messages_queuetype	FP_EXCEPTION	LONG_LIVED	SYSTEM		fp_exception+endif+if hipe# Currently most hipe code use this type.type	HIPE		SYSTEM		SYSTEM		hipe_data+endif+if heap_frag_elim_testtype	SSB		SHORT_LIVED	PROCESSES	ssb+endif## Types used by system specific code#type	DRV_TAB		LONG_LIVED	SYSTEM		drv_tab+if unixtype	SYS_READ_BUF	TEMPORARY	SYSTEM		sys_read_buftype	FD_TAB		LONG_LIVED	SYSTEM		fd_tabtype	FD_ENTRY_BUF	STANDARD	SYSTEM		fd_entry_buftype	FD_LIST		SHORT_LIVED	SYSTEM		fd_listtype	CS_PROG_PATH	LONG_LIVED	SYSTEM		cs_prog_pathtype	ENVIRONMENT	SYSTEM		SYSTEM		environmenttype	PUTENV_STR	SYSTEM		SYSTEM		putenv_stringtype	POLLSET		LONG_LIVED	SYSTEM		poll_settype	POLL_FDS	LONG_LIVED	SYSTEM		poll_fdstype	POLL_RES_EVS	LONG_LIVED	SYSTEM		poll_result_eventstype	FD_STATUS	LONG_LIVED	SYSTEM		fd_statustype	DRV_EV_STATE	LONG_LIVED	SYSTEM		driver_event_statetype	DRV_EV_D_STATE	FIXED_SIZE	SYSTEM		driver_event_data_statetype	DRV_SEL_D_STATE	FIXED_SIZE	SYSTEM		driver_select_data_statetype	POLLSET_UPDREQ	SHORT_LIVED	SYSTEM		pollset_update_reqtype	PRT_REP_EXIT	STANDARD	SYSTEM		port_report_exit+endif+if win32type	DRV_DATA_BUF	SYSTEM		SYSTEM		drv_data_buftype	PRELOADED	LONG_LIVED	SYSTEM		preloadedtype	PUTENV_STR	SYSTEM		SYSTEM		putenv_stringtype	WAITER_OBJ	LONG_LIVED	SYSTEM		waiter_objecttype	ENVIRONMENT	SYSTEM		SYSTEM		environmenttype	CON_VPRINTF_BUF	TEMPORARY	SYSTEM		con_vprintf_buf+endif+if vxworkstype	SYS_TMP_BUF	LONG_LIVED	SYSTEM		sys_tmp_buftype	PEND_DATA	SYSTEM		SYSTEM		pending_datatype	FD_TAB		LONG_LIVED	SYSTEM		fd_tabtype	FD_ENTRY_BUF	SYSTEM		SYSTEM		fd_entry_buf+endif+if osetype	SYS_TMP_BUF	LONG_LIVED	SYSTEM		sys_tmp_buftype	PUTENV_STR	SYSTEM		SYSTEM		putenv_stringtype	GETENV_STR	SYSTEM		SYSTEM		getenv_stringtype	GETENV_STATE	SYSTEM		SYSTEM		getenv_statetype	SIG_ENTRY	SYSTEM		SYSTEM		sig_entrytype	DRIVER_DATA	SYSTEM		SYSTEM		driver_datatype	PGM_TAB		SYSTEM		SYSTEM		pgm_tabtype	PGM_ENTRY	SYSTEM		SYSTEM		pgm_entrytype	PRT_TAB		SYSTEM		SYSTEM		prt_tabtype	PRT_ENTRY	SYSTEM		SYSTEM		prt_entry+endif# ----------------------------------------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -