garray: initialize allocated size in g_byte_array_new_take()
garray: initialize allocated size in g_byte_array_new_take()

Internal allocation size (array->alloc) was being kept to 0 when a new
GByteArray was created from an already existing heap-allocated buffer.

Among other things, this was making g_byte_array_set_size() fully clear all
the buffer contents (not just the newly allocated memory) when
G_DEBUG=gc-friendly was being used...

  if (G_UNLIKELY (g_mem_gc_friendly))
    memset (array->data + array->alloc, 0, want_alloc - array->alloc);

https://bugzilla.gnome.org/show_bug.cgi?id=738170

endlessm/glib,lukasz-skalski/glib,tchakabam/glib,tamaskenez/glib,tchakabam/glib,cention-sany/glib,gale320/glib,johne53/MB3Glib,mzabaluev/glib,tamaskenez/glib,cention-sany/glib,lukasz-skalski/glib,lukasz-skalski/glib,MathieuDuponchelle/glib,endlessm/glib,johne53/MB3Glib,krichter722/glib,tchakabam/glib,MathieuDuponchelle/glib,johne53/MB3Glib,johne53/MB3Glib,krichter722/glib,ieei/glib,mzabaluev/glib,ieei/glib,johne53/MB3Glib,lukasz-skalski/glib,endlessm/glib,krichter722/glib,krichter722/glib,endlessm/glib,ieei/glib,tamaskenez/glib,lukasz-skalski/glib,cention-sany/glib,endlessm/glib,mzabaluev/glib,mzabaluev/glib,Distrotech/glib,MathieuDuponchelle/glib,tamaskenez/glib,cention-sany/glib,johne53/MB3Glib,gale320/glib,Distrotech/glib,gale320/glib,tamaskenez/glib,Distrotech/glib,gale320/glib,mzabaluev/glib,MathieuDuponchelle/glib,Distrotech/glib,MathieuDuponchelle/glib,tchakabam/glib,tchakabam/glib,ieei/glib,ieei/glib,cention-sany/glib,gale320/glib,krichter722/glib,Distrotech/glib