def write( data )
      if data.is_a? Malloc
        if data.size > @size
          raise "Must not write more than #{@size} bytes of memory " +
            "(illegal attempt to write #{data.size} bytes)"
        end
        orig_write data, data.size
      else
        if data.bytesize > @size
          raise "Must not write more than #{@size} bytes of memory " +
            "(illegal attempt to write #{data.bytesize} bytes)"
        end
        orig_write data
      end
    end
def write( data )
      if data.is_a? Malloc
        if data.size > @size
          raise "Must not write more than #{@size} bytes of memory " +
            "(illegal attempt to write #{data.size} bytes)"
        end
        orig_write data, data.size
      else
        if data.bytesize > @size
          raise "Must not write more than #{@size} bytes of memory " +
            "(illegal attempt to write #{data.bytesize} bytes)"
        end
        orig_write data
      end
    end
Write data to memory

 @example Reading and writing data
   m = Malloc.new 4
   # Malloc(4)
   m.write 'abcd'
   m.read 2
   # "ab"

 @param [String,Malloc] data A string or malloc object with the data.
 @return [String] Returns the parameter +string+.

 @see #read