No, if you read someone else's book and write your own with the same overall plot you are considered a derivative work, and people have absolutely lost copyright lawsuits over photographs with the same composition as an existing one that they were copying. The idea here is "memory allocator", and the "expression" is the order and structure used to implement that idea.