Spontaneously I'd say so, with one important point missing:
You need handling for heap overflow.
For the u8vector clearly, and I believe for each pair allocation too.
Please update your code and post again for another round of feedback.
For your reference find a sample routine with heap overflow allocation below, and also see places doing the same in Gambit's code.
I'm not clear on the difference between the ___release_scmobj call you do and the ___still_obj_refcount_dec call the code below does - anyone feel free to clarify/remind.
Mikael
(define (make-still-u32vector len)
(let loop ()
(let ((r ((c-lambda (unsigned-int) scheme-object "___result = ___EXT(___alloc_scmobj)(___sU32VECTOR,___arg1*4,___STILL);
if (!___FIXNUMP(___result)) ___still_obj_refcount_dec(___result); // Inspired by ##make-u8vector of ___kernel.scm .
") len)))
; Recursion here inspired by ##make-u8vector of ___kernel.scm .
(if (not (u32vector? r))
(begin
(error "Heap overflow when allocating u32vector" len) ; (##raise-heap-overflow-exception) should do fine too.
(loop))
(begin
(u32vector-fill! r 0)
r)))))