Own realisation of malloc