added _mesa_alloc_instructions() utility function
diff --git a/src/mesa/shader/program.c b/src/mesa/shader/program.c
index f6877bd..b1d06bb 100644
--- a/src/mesa/shader/program.c
+++ b/src/mesa/shader/program.c
@@ -1313,6 +1313,19 @@
 
 
 /**
+ * Allocate an array of program instructions.
+ * \param numInst  number of instructions
+ * \return pointer to instruction memory
+ */
+struct prog_instruction *
+_mesa_alloc_instructions(GLuint numInst)
+{
+   return (struct prog_instruction *)
+      _mesa_calloc(numInst * sizeof(struct prog_instruction));
+}
+
+
+/**
  * Reallocate memory storing an array of program instructions.
  * This is used when we need to append additional instructions onto an
  * program.