The pointers returned by begin_specify_XXX should all be volatile float
* (or volatile unsigned int * for indices).
The volatile tells the compiler to not get cute with optimization.

The memory returned is UNCACHED - see here
http://hacksoflife.blogspot.com/2012/04/beyond-glmapbuffer.html

So you don't want the compiler trying to reorder memory writes behind
your back.  Instead you use volatile * and write in exact increasing
order to write out the VBO.

Anyway, we can talk more about why the hardware is the way it is and
the weird world of modern CPUs some other time but for now the short of
it is that memory ptrs that are used to write to mem-mapped VBOs should
all be volatile