Add allocation checks for vector usage