(2-8)考察下面的代码:01 enum { BLOCK_HEADER_SIZE = 16 };02 void *AllocateBlock(size_t length) {03 struct memBlock *mBlock;04 if (length + BLOCK_HEADER_SIZE > (unsigned long long)SIZE_MAX) {05 return NULL;06 }07 mBlock = (struct memBlock *)malloc(08 length + BLOCK_HEADER_SIZE09 );10 if (!mBlock) return NULL;11 /* fill in block header and return data portion */12 return mBlock;13 }这段程序最根本的漏洞是什么( )
A: 非异常整数逻辑错误;
B: 有符号整数溢出;
C: 转换错误;
D: 无符号整数回环。
A: 非异常整数逻辑错误;
B: 有符号整数溢出;
C: 转换错误;
D: 无符号整数回环。
D
举一反三
- 用下面哪一个命令可以创建通用图块? A: BLOCK B: WBLOCK C: EXPLODE D: MBLOCK
- 比特币系统中,对全节点和轻节点的认识,正确的是? A: 全节点保存着区块链中区块的完整内容(block header 和 block body) B: 轻节点只保存着区块链中区块的块头信息(block header) C: 轻节点保存着区块链中区块的完整内容(block header 和 block body) D: 全节点只保存着区块链中区块的块头信息(block header)
- HDFS 默认 Block Size 64M
- Which of the following is not an essential factor of a block?() A: Previous block header hash B: Time stamp C: Index value D: Cryptographic hash
- Block Size 是不可以修改的
内容
- 0
HDFS默认Block Size的大小是( )
- 1
在Java中,获取文件大小的方法,是() A: length() B: length C: size() D: size
- 2
Identify two situations in which the block header grows in a data block. () A: when row directories need more row entries B: when there is row migration in the data block C: when there is an increase in the PCTFREE value for the data block D: when more transaction slots are required than are initially configured
- 3
Identify two situations in which the block header grows in a data block. () A: Awhen row directories need more row entries B: Bwhen there is row migration in the data block C: Cwhen there is an increase in the PCTFREE value for the data block D: Dwhen more transaction slots are required than are initially configured
- 4
HDFS的Block Size 是不可以修改的。