• 2022-06-09
    (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: 无符号整数回环。
  • D

    内容

    • 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 是不可以修改的。