Standard allocate() - allocates new memory
| 304 | |
| 305 | // Standard allocate() - allocates new memory |
| 306 | T* allocate(fl::size n) FL_NOEXCEPT { |
| 307 | if (n == 0) { |
| 308 | return nullptr; |
| 309 | } |
| 310 | fl::size size = sizeof(T) * n; |
| 311 | void *ptr = Malloc(size); |
| 312 | if (ptr == nullptr) { |
| 313 | return nullptr; |
| 314 | } |
| 315 | fl::memset(ptr, 0, sizeof(T) * n); |
| 316 | return static_cast<T*>(ptr); |
| 317 | } |
| 318 | |
| 319 | // Standard deallocate() |
| 320 | void deallocate(T* p, fl::size n) FL_NOEXCEPT { |
no test coverage detected