# alloc > Allocate a [buffer][@stdlib/buffer/ctor] having a specified number of bytes.
## Usage ```javascript var allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' ); ``` #### allocUnsafe( size ) **Unsafely** allocates a [buffer][@stdlib/buffer/ctor] having a specified number of bytes. ```javascript var buf = allocUnsafe( 10 ); // returns ```
## Notes - The underlying memory of returned [`Buffer`][@stdlib/buffer/ctor] instances is **not** initialized. Memory contents are unknown and may contain **sensitive** data. - When the `size` is less than half the pool size (specified on the [`Buffer`][@stdlib/buffer/ctor] constructor in modern Node.js environments), memory is allocated from the [`Buffer`][@stdlib/buffer/ctor] pool for faster allocation of new [`Buffer`][@stdlib/buffer/ctor] instances.
## Examples ```javascript var allocUnsafe = require( '@stdlib/buffer/alloc-unsafe' ); var buf; var i; // Repeatedly unsafely allocate memory and inspect the buffer contents... for ( i = 0; i < 100; i++ ) { buf = allocUnsafe( 100 ); console.log( buf.toString() ); } ```