B2G/gecko/dom/system/gonk/tests/test_ril_worker_buf.js
// Allocate an array of specified size and set each of its elements to value.
Allocate an array of specified size and set each of its elements to value.
Allocate an array of specified size and set each of its elements to value .
function calloc(length, value) {
    let array = new Array(length);
    for (let i = 0; i < length; i++) {
      array[i] = value;
    }
    return array;
  }
function calloc ( length , value ) { let array = new Array ( length ) ; for ( let i = 0 ; i < length ; i ++ ) { array [ i ] = value ; } return array ; }
Allocate an array of specified size and set each of its elements to value.
Allocate an array of specified size and set each of its elements to value .