• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / go-tarantool / 24095941689 / 1
76%
master: 76%

Build:
DEFAULT BRANCH: master
Ran 07 Apr 2026 06:00PM UTC
Files 19
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Apr 2026 05:47PM UTC coverage: 74.565% (+0.4%) from 74.198%
24095941689.1

push

github

oleg-jukovec
api: add Allocator interface for response buffers

Previously, response buffer allocation was hardcoded with an internal
pooler implementation. Users had no control over memory management
for responses, which could be problematic for applications with
specific memory requirements or custom allocation strategies.

The new Allocator interface allows users to implement custom buffer
allocation and reuse strategies:

```
// Allocator is an interface for allocating and deallocating byte
// slices.
type Allocator interface {
    // Get returns a pointer to a byte slice of at least the given
    // length.
    // The caller should not assume anything about the slice's
    // capacity.
    //
    // If the allocator cannot allocate a buffer (e.g., invalid
    // length), it returns nil. The caller must handle this case
    // appropriately.
    Get(length int) *[]byte
    // Put returns a byte slice to the allocator for reuse.
    // After calling Put, the caller must not use the slice.
    //
    // The caller must ensure that the slice length remains unchanged
    // between Get and Put calls. Modifying the slice length before
    // calling Put may prevent the allocator from properly reusing the
    // buffer.
    Put(buf *[]byte)
}
```

The PoolAllocator type provides a ready-to-use implementation based
on sync.Pool for power-of-two sized byte slices.

The Opts.Allocator option enables configuring a custom allocator
for a connection. This is useful for applications that need to
optimize memory usage or integrate with custom memory management
systems.

Closes #493

3087 of 4140 relevant lines covered (74.57%)

10177.56 hits per line

Source Files on job 24095941689.1
  • Tree
  • List 19
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 24095941689
  • 7858b1b9 on github
  • Prev Job for on master (#23905295626.1)
  • Next Job for on master (#24194309794.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc