Fix: generateFunction doesn’t handle void* type

- Fix: generateFunction doesn’t handle void* type
- Add memory example