Packages

占用指定大小和时间(毫秒)的内存

Retired package: Release invalid

Current section

Files

Jump to
memory_occupy README.md
Raw

README.md

# memory_occupy
占用指定大小和时间(毫秒)的内存,或者永久占用指定大小的内存。
[![Package Version](https://img.shields.io/hexpm/v/memory_occupy)](https://hex.pm/packages/memory_occupy)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://memory-occupy.hexdocs.pm/)
```sh
gleam add memory_occupy
```
```gleam
import memory/occupy
pub fn main() {
// 1GB占用10000毫秒
occupy.gb(1, 10_000)
// 2GB永久占用
occupy.gb_forever(2)
}
```
## Development
```sh
gleam run # Run the project
gleam test # Run the tests
```