Memory fragmentation manifests as two main types: internal fragmentation, where allocated blocks are larger than requested, wasting space within the block (e.g., a 29KB request getting a 32KB block); and external fragmentation, where free memory is scattered in small, non-contiguous chunks, preventing larger allocations despite sufficient total free space. Custom allocators address these by allocating variable-sized blocks or using memory pools of different block sizes to reduce internal fragmentation, and by grouping allocations or using compaction to mitigate external fragmentation.