资源简介
安装rabbitmq3.7.12版本对应的otp_src_21.2.tar.gz安装
代码片段和文件信息
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 1996-2018. All Rights Reserved.
*
* Licensed under the Apache License Version 2.0 (the “License“);
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing software
* distributed under the License is distributed on an “AS IS“ BASIS
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* %CopyrightEnd%
*/
#ifdef HAVE_CONFIG_H
# include “config.h“
#endif
#include “sys.h“
#include “erl_sys_driver.h“
#include “erl_vm.h“
#include “global.h“
#include “hash.h“
#include “atom.h“
#define ATOM_SIZE 3000
IndexTable erts_atom_table; /* The index table */
static erts_rwmtx_t atom_table_lock;
#define atom_read_lock() erts_rwmtx_rlock(&atom_table_lock)
#define atom_read_unlock() erts_rwmtx_runlock(&atom_table_lock)
#define atom_write_lock() erts_rwmtx_rwlock(&atom_table_lock)
#define atom_write_unlock() erts_rwmtx_rwunlock(&atom_table_lock)
#if 0
#define ERTS_ATOM_PUT_OPS_STAT
#endif
#ifdef ERTS_ATOM_PUT_OPS_STAT
static erts_atomic_t atom_put_ops;
#endif
/* Functions for allocating space for the ext of atoms. We do not
* use malloc for each atom to prevent excessive memory fragmentation
*/
typedef struct _atom_text {
struct _atom_text* next;
unsigned char text[ATOM_TEXT_SIZE];
} AtomText;
static AtomText* text_list; /* List of text buffers */
static byte *atom_text_pos;
static byte *atom_text_end;
static Uint reserved_atom_space; /* Total amount of atom text space */
static Uint atom_space; /* Amount of atom text space used */
/*
* Print info about atom tables
*/
void atom_info(fmtfn_t to void *to_arg)
{
int lock = !ERTS_IS_CRASH_DUMPING;
if (lock)
atom_read_lock();
index_info(to to_arg &erts_atom_table);
#ifdef ERTS_ATOM_PUT_OPS_STAT
erts_print(to to_arg “atom_put_ops: %ld\n“
erts_atomic_read_nob(&atom_put_ops));
#endif
if (lock)
atom_read_unlock();
}
/*
* Allocate an atom text segment.
*/
static void
more_atom_space(void)
{
AtomText* ptr;
ptr = (AtomText*) erts_alloc(ERTS_ALC_T_ATOM_TXT sizeof(AtomText));
ptr->next = text_list;
text_list = ptr;
atom_text_pos = ptr->text;
atom_text_end = atom_text_pos + ATOM_TEXT_SIZE;
reserved_atom_space += sizeof(AtomText);
VERBOSE(DEBUG_SYSTEM(“Allocated %d atom space\n“ATOM_TEXT_SIZE));
}
/*
* Allocate string space within an atom text segment.
*/
static byte*
atom_text_alloc(int bytes)
{
byte *res;
ASSERT(bytes <= MAX_ATOM_SZ_LIMIT);
if (atom_text_pos + bytes >= atom_text_end) {
more_atom_space();
}
res = atom_text_pos;
atom_text_pos += bytes;
atom_space += bytes;
return res;
}
/*
* Calculate atom hash value (using the hash
相关资源
- windows界面下批量操作,监控管理上万
- 《Linux-UNIX系统编程手册 上 下册 合》
- uboot代码详细分析完整88页版.pdf
- 宋宝华linux设备驱动开发详解及配套源
- linux-2.6.26.tar.gz
- jdk6\\jdk7_linux_64
- 蜗窝科技论坛pdf版
- linux版JDK1.8
- Linux就是这个范儿 带书签目录 高清完
- burpsuite_community_linux_v2_1_01.zip
- 专业嵌入式软件开发 全面走向高质高
- otp_src_19.1.tar.gz
- seafile-server_7.0.5_stable_pi.tar.gz
- Linux环境下C编程指南-第2版-杨树青清
- RabbitMQ资源包
- CanFestival移植到arm的am3359
- 深入理解linux内核第三版.zip
- linux管道通信例程
- 支持IDEA中文输入的JRE环境
- 跟老男孩学Linux运维:Shell编程实战
- LINUX内核完全剖析:基于0.12内核
- jdk-8u171-linux-i586.tar.gz和zookeeper-3.4.6.
- jdk-8u144-linux-x64.tar.gz.zip
- 后台开发:核心技术与应用实践.徐晓
- centos下nvidia-docker2环境安装离线安装资
- xampp-linux-x64-1.8.2-5-installer
- update_MapleStory_service_linux_arm64_amd64_aa
- gcc-linaro-6.3.1-2017.05-x86_64_arm-linux-gnue
- 基于linux c实现web服务器
- Ext4研究与性能分析
评论
共有 条评论