Add a missing spinlock initializer.
Fix an incorrect code convention.
Calculate input stream data when calculating memory usage.