Internal functions Buffer allocation
344223
function createParticleBuffers ( geometry ) {

		geometry.__webglVertexBuffer = _gl.createBuffer();
		geometry.__webglColorBuffer = _gl.createBuffer();

		_this.info.geometries ++;

	}
1107660
function _toBuffer(buffer) {
        var _buffer, nums;

        if (Buffer.isBuffer(buffer)) {
            _buffer = new Buffer(buffer.length);
            buffer.copy(_buffer);
        }
        else if (Array.isArray(buffer)) {
            _buffer = new Buffer(buffer);
        }
        else if (typeof buffer === 'string') {
            nums = buffer.replace(/^0x/i, '').match(/.{1,2}(?=(..)+(?!.))|..?$/g);
            _buffer = new Buffer(nums.length);

            _buffer.fill(0);

            for (var i = nums.length - 1; i >= 0; i--) {
                _buffer.writeUInt8(parseInt(nums[i], 16), i);
            }
        }

        return _buffer;
    }
284761
function() {
    var b = this.buffer, o = this.offset, carry = 1;
    for (var i = o + 7; i >= o; i--) {
      var v = (b[i] ^ 0xff) + carry;
      b[i] = v & 0xff;
      carry = v >> 8;
    }
  }
181136
function toBuffer(data, encoding) {
    return (typeof Buffer.from === 'function' && Buffer.from !== Uint8Array.from) ?
        Buffer.from(data, encoding) : new Buffer(data, encoding);
}
1054843
def _ram_buffer(self):
        """"""
        # get the address of the RAM
        address = _LIB.Memory(self._env)
        # create a buffer from the contents of the address location
        buffer_ = ctypes.cast(address, ctypes.POINTER(RAM_VECTOR)).contents
        # create a NumPy array from the buffer
        return np.frombuffer(buffer_, dtype='uint8')
278097
protected ByteBuffer allocateBuffer() {
		if (_buffersToReuse != null && !_buffersToReuse.isEmpty()) {
			ByteBuffer bb = _buffersToReuse.poll();
			bb.rewind();
			bb.limit(bb.capacity());
			return bb;
		}
		ByteBuffer r = StaticBuffers.getInstance().byteBuffer(BUFFER_KEY, _bufferSize);
		r.limit(_bufferSize);
		return r.order(_order);
	}
313264
public final void freeBuffers()
    {
        if (_bufferHolder != null) {
            byte[] buf = _inputBuffer;
            if (buf != null) {
                _inputBuffer = null;
                _bufferHolder[0] = buf;
            }
        }
    }
610508
function magicBuffer(buf, cb) {
  try {
    buf = bufferUtils.toBuffer(buf);
    magic(buf, cb);
  } catch(err) {
    cb(err);
  }
}
627864
def memory_pour(buffer_, *args, **kwargs):
    """"""

    def opener(archive_res):
        _LOGGER.debug("Opening from (%d) bytes (memory_pour).", len(buffer_))
        _archive_read_open_memory(archive_res, buffer_)

    return _pour(opener, *args, flags=0, **kwargs)
1045707
function infoBuffer(buf, cb) {
  try {
    buf = bufferUtils.toBuffer(buf);
    (0, _info2.default)(buf, cb);
  } catch (err) {
    cb(err);
  }
}
19706
function fromBufferWithMime( type, bufferContent, options, cb, withPath ) {
  if ( typeof type === 'string' &&
       bufferContent &&
       bufferContent instanceof Buffer &&
       ( typeof options === 'function' || typeof cb === 'function' ) ) {
    _writeBufferToDisk( bufferContent, function( newPath ) {
      fromFileWithMimeAndPath( type, newPath, options, cb );
    });
  } else {
    _returnArgsError( arguments );
  }
}
625148
private void newBuffer(int offset) {
    if (maxBufferSize >= 0) {
      buffer = new int[maxBufferSize];
      isByte = new boolean[maxBufferSize];
      bufferOffset = offset;
      currentBufferSize = 0;
    }
  }
831405
function copyBuffer(buf) {
  var targetBuffer = new Buffer(buf.length);
  buf.copy(targetBuffer);
  return targetBuffer;
}
573833
function copyBuffer(buf, pos, len) {
  var copy = new Buffer(len);
  buf.copy(copy, 0, pos, pos + len);
  return copy;
}
33393
@SuppressWarnings("unused")
    private void allocateDataChannel(int channelType, int channelIndex) {
        switch (channelType) {
        case NORMALS:
            m_normals = ByteBuffer.allocateDirect(
                    m_numVertices * 3 * SIZEOF_FLOAT);
            m_normals.order(ByteOrder.nativeOrder());
            break;
        case TANGENTS:
            m_tangents = ByteBuffer.allocateDirect(
                    m_numVertices * 3 * SIZEOF_FLOAT);
            m_tangents.order(ByteOrder.nativeOrder());
            break;
        case BITANGENTS:
            m_bitangents = ByteBuffer.allocateDirect(
                    m_numVertices * 3 * SIZEOF_FLOAT);
            m_bitangents.order(ByteOrder.nativeOrder());
            break;
        case COLORSET:
            m_colorsets[channelIndex] = ByteBuffer.allocateDirect(
                    m_numVertices * 4 * SIZEOF_FLOAT);
            m_colorsets[channelIndex].order(ByteOrder.nativeOrder());
            break;
        case TEXCOORDS_1D:
            m_numUVComponents[channelIndex] = 1;
            m_texcoords[channelIndex] = ByteBuffer.allocateDirect(
                    m_numVertices * 1 * SIZEOF_FLOAT);
            m_texcoords[channelIndex].order(ByteOrder.nativeOrder());
            break;
        case TEXCOORDS_2D:
            m_numUVComponents[channelIndex] = 2;
            m_texcoords[channelIndex] = ByteBuffer.allocateDirect(
                    m_numVertices * 2 * SIZEOF_FLOAT);
            m_texcoords[channelIndex].order(ByteOrder.nativeOrder());
            break;
        case TEXCOORDS_3D:
            m_numUVComponents[channelIndex] = 3;
            m_texcoords[channelIndex] = ByteBuffer.allocateDirect(
                    m_numVertices * 3 * SIZEOF_FLOAT);
            m_texcoords[channelIndex].order(ByteOrder.nativeOrder());
            break;
        default:
            throw new IllegalArgumentException("unsupported channel type");
        }
    }
402547
function processBuffer(buffer) {
      if (!outputJSON.buffers) {
        outputJSON.buffers = [{ byteLength: 0 }];
      }

      // All buffers are merged before export.
      buffers.push(buffer);

      return 0;
    }
51193
function buffer(arr) {
    if (!Array.isArray(arr)) {
        return;
    }

    var l = new List();
    arr.forEach(function(el) {
        l[syncMethodName("add")](el);
    });
    return convert[syncMethodName("asScalaBuffer")](l);
}