code: def __alloc_raw_data(self, initial_values=None):
          
          #allocate c_ubyte storage
          if self.__raw_data == None: #first time only, create storage
              raw_data_type = c_ubyte * self.__raw_report_size
              self.__raw_data = raw_data_type()
          elif initial_values == self.__raw_data:
              # already
              return
          else:
              #initialize
              ctypes.memset(self.__raw_data, 0, len(self.__raw_data))
          if initial_values:
              for index in range(len(initial_values)):
                  self.__raw_data[index] = initial_values[index]
docs: Pre-allocate re-usagle memory